> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rocket.new/llms.txt
> Use this file to discover all available pages before exploring further.

# Redirect URLs

> Set the correct Supabase redirect URL so auth links work in your Rocket.new app.

export const LlmsDirective = () => <blockquote className="llms-directive">
    For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
    For a lightweight markdown version of this page, append .md to the URL.
  </blockquote>;

<LlmsDirective />

<Info>
  By default, Supabase sends confirmation, password reset, and magic links to `http://localhost:3000`. This guide covers updating the Site URL in Supabase to your live app so those links work correctly for real users.
</Info>

## Why you need to update redirect URLs

By default, Supabase sends all user links (confirmation, reset, and magic) to `http://localhost:3000`.
If you publish your Rocket app without changing this, users will be sent to a broken page.

<Warning>
  Updating this URL ensures users return to your live app after clicking any Supabase link.
</Warning>

## Update the redirect URL in Supabase

<Steps>
  <Step title="Open your Supabase project">
    Log in to [Supabase](https://supabase.com/) and select the project connected to your Rocket app.
  </Step>

  <Step title="Go to authentication settings">
    In the left sidebar, click **Authentication**, then open the **URL Configuration** tab.

    <Frame caption="Open URL Configuration under Authentication">
      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/2lqYWidv_xVHKfL6/images/build-docs/connectors/supabase/redirect-urls/supabase-redirect-url-light.webp?fit=max&auto=format&n=2lqYWidv_xVHKfL6&q=85&s=d39f8939dff968183edfaf6b8481e5e1" alt="Supabase authentication settings showing the URL Configuration tab with the Site URL field." className="theme-image light-image" width="2880" height="1624" data-path="images/build-docs/connectors/supabase/redirect-urls/supabase-redirect-url-light.webp" />

      <img src="https://mintcdn.com/dhiwisepvtltd-5e04e6a4/2lqYWidv_xVHKfL6/images/build-docs/connectors/supabase/redirect-urls/supabase-redirect-url-dark.webp?fit=max&auto=format&n=2lqYWidv_xVHKfL6&q=85&s=4892faaa3c7c322a566be41919f239e7" alt="Supabase authentication settings showing the URL Configuration tab with the Site URL field." className="theme-image dark-image" width="2880" height="1624" data-path="images/build-docs/connectors/supabase/redirect-urls/supabase-redirect-url-dark.webp" />
    </Frame>
  </Step>

  <Step title="Replace the Site URL">
    Find the **Site URL** field. Replace `http://localhost:3000` with your app's live URL.
    Examples:

    * `https://your-app-name.builtwithrocket.new`
    * `https://yourdomain.com`
  </Step>

  <Step title="Save changes">
    Click **Save** at the bottom of the page.
  </Step>

  <Step title="Test your links">
    Sign up using a test email and open the confirmation link. It should take you to your live Rocket app, not `localhost`.
  </Step>
</Steps>

<Note>
  This setting applies to:

  * Email confirmation links.
  * Password reset links.
  * Magic links (if enabled).
</Note>

## Troubleshooting

### Link still goes to localhost

Clicking the link opens `localhost:3000` instead of your live app.

* Double-check that the **Site URL** field in Supabase is set to your live URL and begins with `https://`.
* Remove any trailing slashes. They can interfere with redirects.

### Link opens the app, but user is not logged in

The link loads your app, but the user is not authenticated.

* Make sure the redirect URL exactly matches your app's domain, including protocol (`https://`) and no trailing slash.
* Confirm your Rocket app is connected to the same Supabase project where the URL is set.

<Card icon="link" horizontal title="Links that land where they should">
  Your Supabase links now take users straight into your live Rocket app.
</Card>
