Platform

Netlify fixes

Page not found on refresh, env vars, and redirect rules.

11 fixes, most common first.

  1. Rank 1. Supabase login redirects to localhost:3000 after deploy

    Login or email confirm sends users to localhost:3000 on your live site? Change Supabase's Site URL and add your domain to Redirect URLs.

  2. Rank 2. Invalid API key (Supabase)

    Supabase says "Invalid API key" on your live site? Usually the key or project URL env var is missing, mistyped, or from another project.

  3. Rank 3. Environment variables are undefined in production

    Works locally but env vars are undefined once deployed? Add them to your host, use the VITE_ or NEXT_PUBLIC_ prefix for browser code, then redeploy.

  4. Rank 7. Stripe webhook failing: 404, 307/308 redirect, timeout or 500

    Stripe shows webhook deliveries Failed with 3xx, 4xx, 5xx or timed out? Point it at the exact final URL and respond 200 fast.

  5. Rank 8. Blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present

    "Blocked by CORS policy" on your live site? The server you call must allow your domain. How to fix it for APIs you own and ones you don't.

  6. Rank 11. Netlify "Page not found" when refreshing or opening a link

    Netlify shows "Page not found" on refresh or deep links? Add the /* /index.html 200 rewrite so your single-page app handles routing.

  7. Rank 25. Mixed Content: the page was loaded over HTTPS but requested an insecure resource

    Browser blocks requests with a "Mixed Content" warning on your HTTPS site? Change every http:// URL your app calls to https://.

  8. Rank 31. Invalid JWT after switching to sb_publishable or sb_secret keys

    The app broke after Supabase's new sb_publishable or sb_secret keys? Legacy keys can stay on until you swap them. Don't send the new keys as a Bearer JWT.

  9. Rank 35. Clerk sign-in keeps redirecting in a loop

    The app bounces between the page and Clerk sign-in forever? The redirect target is protected too, or the force-redirect URL points back at the gate.

  10. Rank 36. TypeError: Failed to fetch (only in production)

    The live site says Failed to fetch, but the preview worked? The browser could not open the connection. Check the URL, HTTPS, and the console, not the HTTP status.

  11. Rank 37. Vite env var is undefined because the name has no VITE_ prefix

    import.meta.env.MY_KEY is undefined in a Vite app? Vite only exposes names that start with VITE_. Rename it and rebuild.

All platforms

Can't fix it? Get help.

If the steps didn't clear the error, send what the screen says. A person can take a look. This is a request for a paid fix, not an instant chat.

Request a fix