VibeFix

Guide

The confirmation link in my sign-up email opens localhost

Published by Yosef D., founder of VibeFix

How this guide was made: Written with AI assistance and checked against the sources linked on this page.

Updated

Short answer: the confirmation link opens localhost because your sign-in service's Site URL is still http://localhost:3000, or your live address is missing from the Redirect URLs allow list. In Supabase, open Authentication, URL Configuration, set Site URL to your live address, add it to Redirect URLs, and pass emailRedirectTo when signing up.

A new person signs up, opens the confirmation email, taps the link and gets "This site can't be reached", a localhost address, or your preview instead of your app. Most stop right there.

Fixed in your code, then tested live. Get it fixed: a free check first confirms the problem on your live app, usually in 4 to 10 minutes.

Free. No account needed. It usually takes 4 to 10 minutes.

Want it fixed? For Lovable apps or code on GitHub, our AI agent fixes it in your code for $79 and tests your live app again. If we can't complete your re-check, you get your money back.

Why it happens

Your sign-in service decides where the email link sends people. When your app does not name an approved address, it falls back to one default, often still the builder's local address.

Possible causes

How to fix it (Supabase)

  1. In the Supabase dashboard open Authentication, URL Configuration.
  2. Set Site URL to your live address, for example https://yourapp.com (https, no trailing slash). Supabase says this setting is critical for email confirmations and password resets.
  3. Under Redirect URLs add your live address with a wildcard, for example https://yourapp.com/. Keep http://localhost:3000/ only if you still develop locally.
  4. In the sign-up code, pass the live address so the link never falls back to the default: supabase.auth.signUp({ email, password, options: { emailRedirectTo: 'https://yourapp.com/welcome' } }). The address must match an entry in Redirect URLs, or Supabase uses the Site URL instead.
  5. Open Authentication, Email Templates, Confirm signup. If the link is built from {{ .SiteURL }}, step 2 fixes it. If it uses {{ .ConfirmationURL }}, the redirect_to part comes from step 4.
  6. Search the app's code for "localhost" and for the preview address, and replace any hard-coded one with the live address.

How do I check it's fixed?

  1. Open your live app in a private window and sign up with a new address.
  2. Open the email and long-press or hover over the link: the redirect_to part (or the start of the link) shows your live address.
  3. Tap it: you land on your live app, signed in or on the confirmation page, not on localhost or the preview.

You can't see it yourself

You're signed in, your customers aren't. You are already signed in, so you never receive that email. On your own computer a localhost link might even open.

Related: Case: sign-up emails still linked to localhost although the settings looked right · The sign-up confirmation email never arrives · Sign-up or login broken after publishing: users bounce back to login or land on localhost

Sources (official documentation)

VibeFix is independent. Lovable, Bolt, Replit, Base44, v0, Supabase, Firebase, Stripe and Vercel are trademarks of their owners.

Want it fixed for you? For apps built in Lovable or any app whose code is on GitHub, VibeFix's AI agent can find the cause of this error, fix it in your code and re-check your live app. Start with a free check: https://vibe-fixer.com

More guides · Shopify store accessibility · About · Your privacy choices