Deployment

Lovable app not working after publish? 7 fixes, by symptom

Short answer

  • The live site is a snapshot of your last publish: edits only go live after you publish an update.
  • If the publish fails, read the build error in the logs, or go back to the last version that published and reapply changes one at a time.
  • Login, data and domain problems after publishing usually come from settings outside the code: Supabase auth URLs, database permissions and DNS records.

Your app works in the Lovable editor. You publish, and the live site shows old content, a blank page, a broken login or no data at all. Here are the seven usual causes, in the order to check them.

Symptoms

What you see on the live siteGo to
Your latest changes are missingStep 1
Publishing fails or never finishesSteps 2 and 3
A blank white pageStep 4
Login works in the preview, not on the live siteStep 5
Data shows in the preview, not for real usersStep 6
Your custom domain shows nothing or stays on VerifyingStep 7
You host the app on Netlify or Vercel and pages 404 or stay blankHosting outside Lovable

Likely causes

  1. The update was never published. The live site keeps the last published version.
  2. A build error stops the publish. The preview can look fine while the publish fails.
  3. A runtime error stops the page from rendering, which leaves it blank.
  4. Supabase auth still points to localhost or the preview, so logins bounce.
  5. Database permissions refuse requests from real users.
  6. DNS records for the custom domain are missing, wrong or proxied.
  7. An outside host is missing environment variables or a routing rule.

Step-by-step fix

1. Publish the update, then check in a private window

The live site is a snapshot of the version you last published. Edits made afterwards show in the editor preview, not on the live site, until you publish an update. Publish, then open the live URL in a private window so your browser cache doesn't show the old version.

2. Read the publish error

If publishing fails, Lovable's FAQ says the cause is usually a build error in the current version. Open the publish or deployment logs, fix the first error they name, and publish again. If publishing is stuck for more than 10 minutes, refresh the page and try again.

3. Go back to the last version that published

If you can't find the error, restore the last version that published successfully, publish it, then reapply your recent changes one at a time until the publish breaks again. That change is the one to fix.

4. Read the first console error on a blank page

Open the live URL, press F12 and read the first red error in the console, not the last. It usually names the missing variable, the failed import or the component that crashed.

5. Fix the Supabase auth URLs

If login works in the preview but not on the live site, open Supabase, then Authentication and URL Configuration. Set the Site URL to your live address, and add your lovable.app URL and your custom domain to the Redirect URLs. The default Site URL is localhost.

6. Check database permissions for missing data

If data shows in the preview but not for real users, the database is refusing the request. Look for permission errors such as 42501 in the console, then check the Row Level Security policies and grants for that table.

7. Fix the custom domain records

Use exactly the DNS records shown in your project's domain settings. While the domain shows Verifying, Lovable has not detected your record yet. Turn off Cloudflare's proxy for that record if you use Cloudflare, and allow up to 72 hours.

Sources: Lovable publishing, Lovable deployment troubleshooting, Lovable custom domains and Supabase redirect URLs. Before you dig into your code, check Lovable's status page for an incident. For error 42501, see the Supabase grants change.

Hosting outside Lovable (Netlify, Vercel)

  • Environment variables: variables set in Lovable don't travel to another host. Copy every VITE_ variable your app uses (for Supabase, typically the project URL and the publishable key) into the host's settings, then redeploy: Vite bakes them in at build time.
  • Routing: a single-page app needs a rewrite, or every page except the home page returns 404 on refresh. On Netlify, add a _redirects file containing /* /index.html 200, as Netlify's Lovable guide shows. On Vercel, add the equivalent rewrite in vercel.json.
  • Auth URLs: add the new domain to your Supabase Site URL and Redirect URLs (step 5).

Copy-paste prompt for Lovable

My app works in the Lovable preview but not on the published site. Without rewriting features:
1. Check the latest publish or build logs and list every error, with file and line.
2. Fix only those errors, one at a time, and tell me what you changed.
3. List every environment variable and Supabase setting the published site needs, and tell me which ones are missing.
Don't change anything else.

How to verify the fix

  • Open the live URL in a private window: sign up as a new user, log in, create a record, log out.
  • The browser console stays free of red errors during that journey.
  • Refresh a deep page (for example /dashboard): it loads, with no 404.
  • Repeat the test on your custom domain if you have one.

FAQ

Why does my Lovable app work in the preview but not after publishing?

The preview shows the editor's current version. The live site is a separate snapshot of your last publish, so it only changes when you publish an update, and a publish can fail on a build error in the current version, which the logs show.

How long does a Lovable custom domain take to work?

DNS changes can take up to 72 hours, according to Lovable's documentation. While the domain shows Verifying, Lovable has not detected your record yet: check it matches the records in your project's domain settings exactly.

Do I need a paid Lovable plan for a custom domain?

Yes. According to Lovable's documentation, custom domains require a paid plan.

Can you fix it for me?

Yes. Start with the free Lovable and Bolt audit: it checks your live app and sends exact fix steps within 24 hours. If you would rather not apply them yourself, I can fix the issue for you after the audit.

Get a free audit