# Supabase auth redirect not working: why sign-in lands on the wrong page

> Sign-in, magic links and confirmation emails that land on the wrong page: the two Supabase settings behind it and how to set them.

Canonical: https://vibely.sh/guides/supabase-auth-redirect-not-working
Last updated: 2026-11-25

By [Krishna Benna](https://vibely.sh/authors/krishna-benna) · Published 2026-11-25 · Troubleshooting · 4 min read

## Short answer

Sign-in that sends people to the wrong page, or to a page they can’t open, is almost always Supabase’s Site URL and Redirect URLs. Set the Site URL to your published address, add every address your app runs on to Redirect URLs, and check them again whenever you publish to a new address or add a domain.

## Reference documentation

- [Users and authentication](https://docs.vibely.sh/features/backend/auth)

## Why it breaks

Every redirect-based flow, such as Google sign-in, magic links, email confirmation and password reset, sends the user away and back. Supabase completes the round trip only when the return address is on its allowlist, and your app has more than one address: the preview while you build, and the published address or your domain for your users.

## How to fix it

In your Supabase dashboard, open **Authentication → URL Configuration**:

1. **Site URL:** your published address, or your custom domain once it’s verified.
2. **Redirect URLs:** one entry per address, for example `https://<short-id>.vibelyagent.com/**`, `https://<your-slug>.vibelyagent.com/**` and `https://app.example.com/**`. Keep them all: removing the preview breaks sign-in while you build, and removing the published one breaks it for your users.
3. **Check again** after any address change.

## Frequently asked questions

### Why do my confirmation emails open a page users can’t load?

The Site URL points at the preview. Supabase uses the Site URL for the link inside confirmation emails, so set it to your published address or your custom domain.

### Does Vibely update these settings for me?

No. Vibely doesn’t change them when you publish or add a domain, so set them yourself in Supabase.

### What redirect URI does Google or Apple need?

Your Supabase callback, https://<project-ref>.supabase.co/auth/v1/callback, not your app’s address.

## Related

- [Why isn’t my custom domain working?](https://vibely.sh/guides/why-isnt-my-custom-domain-working) - previous guide
- [Best AI app builder in 2026: how to choose one you can ship with](https://vibely.sh/guides/best-ai-app-builder) - next guide
- [Troubleshooting guides](https://vibely.sh/guides/category/troubleshooting)
