Your Lovable app works in preview. After you publish, it doesn’t.
It’s almost always one of five things: changes you haven’t published, sign-in links pointing at the wrong address, data rules that only let you in, a missing secret, or the domain itself. Here’s how to find which one, in Lovable’s own settings.

In short
- In Lovable, publishing copies your project as it was at that moment. Anything you change afterwards stays off the live site until you publish again.
- Preview runs with you signed in as the owner. The live app meets strangers, a new address and real data rules.
- Check five things in order: what’s published, sign-in addresses, data rules, secrets and backend functions, and the domain.
- Every check below is in Lovable’s own settings, and none of them needs code.
01The short answer
Preview and live are two different places
When you publish a Lovable project, Lovable deploys a copy of it as it was at that moment. The live site keeps showing that version, and later changes stay off it until you publish again1. The preview, meanwhile, runs in the editor with you signed in as the owner of everything.
So “it works in preview and not after deploy” almost always comes down to one of five differences between the two places. Go through them in this order; the first three explain most cases.
- The live site is an older version than the one you’re looking at.
- Sign-in sends people to the wrong address.
- The data rules only let you in.
- A secret or a backend function is missing on the live app.
- The domain or the app’s visibility stops people reaching it at all.
02Version and address
Is the live site the version you think it is?
A dot on the Publish button means you have changes that aren’t live. Click Publish, then Publish changes to update the live site1. If you accepted a change that touched the database, file storage or backend functions, those parts take effect on the live app straight away, while the pages and screens wait for you to publish. Lovable’s advice is to publish right after you accept1, or the live screens can be talking to a database that has already changed under them.
If people can’t reach the app at all, check two more things:
- Who may visit. A published app is public by default, but it can be set so only workspace members or people you invite can see it. Anyone else is asked to log in to Lovable and then sees “You don’t have access”2.
- Your own domain. It needs the A record Lovable shows you, plus a TXT record whose value starts with lovable_verify. Leftover records from an old host send visitors to the wrong site; Cloudflare errors 1001 or 1003 mean the record is proxied and should be set to DNS only; CAA records can block the certificate. DNS can take up to 72 hours, and the domain is ready when it shows Active3.
03Sign-in
Sign-in works in preview and breaks live
Sign-in emails and sign-in with Google send people back to an address, and that address has to be on an allowed list. Lovable’s own docs say: if sign-in works in preview but breaks on your published app or custom domain, these addresses are usually the reason4.
- On Lovable Cloud: when you publish, Lovable sets the Site URL to the published address, unless it’s already on your own domain, and adds a custom domain to the redirect URLs when you connect one4. Check the list in More, Users, Settings, Advanced, Redirect URLs4.
- On your own Supabase project: Lovable doesn’t set these for you. Open that project’s authentication settings and set the Site URL and the redirect URLs yourself45.
- Google sign-in with your own Google credentials: a new domain also needs its redirect address added in Google Cloud Console4.
Test it the way a customer would: a private browser window, the live address, a brand new account.
04Data rules
It shows data to you and nothing to customers
Lovable protects data with row level security: rules, called policies, that decide which rows each signed-in person can see or change6. In preview you’re usually the owner of the test data, so everything shows. A customer signing in on the live app only sees what the policies allow, and a policy that compares the wrong thing shows them nothing.
- Look at the rules in More, Database, Manage, Policies. That view is read-only; to change a rule, ask Lovable in the project chat6.
- Test with a second, ordinary account, not the owner’s.
- Watch for the opposite problem too. A policy that only checks that someone is signed in gives every signed-in person the same access to those rows6, so one customer can read another’s. That one doesn’t break anything you can see, which is why it’s worth a security check.
05Secrets and functions
A feature that calls another service fails
Payments, emails and anything else that talks to an outside service usually runs in a backend function, and the function reads its API keys from your project’s secrets78.
- Secrets live in More, Settings, Secrets, and only backend functions can read them; they never reach the browser7. Values whose names start with VITE_ are built into the pages and are public7, so a private key must never be one of those.
- The function’s own logs show what failed: More, Database, Manage, Edge functions, pick the function, then View logs8. More, Settings, Logs also has database and sign-in logs9.
- If a function seems not to have the latest code, you can ask Lovable in the chat to deploy it8.
06Next time
Keep it from coming back
- Publish right after you accept a change that touches the database or backend.
- After every publish, open the live address in a private window and sign in with a second account.
- Keep a short list of the secrets the app needs and where each one is set.
- Keep the code synced to GitHub, so there is always a copy in your name.
- Watch the live app, not the preview: error tracking and an uptime check that alert a person.
That last line is most of what an app needs once customers use it, and our guide You built your app with AI. Who looks after it now? covers the rest in plain words.
If you’ve been through all five and it still breaks, or it breaks a different way every week, that’s the point to bring someone in. It’s what we do for apps built with Lovable: we find what’s really wrong, fix it, and then look after the app every day with someone on call, while you keep building in Lovable.
Questions people ask
Why does my Lovable app work in preview but not when published?
Usually because the live app is an older version, sign-in points at the wrong address, or the data rules only let the owner see data. Check what’s published first, then the redirect URLs, then the policies.
Do I need to publish again after every change?
Yes. The live site keeps the version you last published until you click Publish and then Publish changes. A dot on the Publish button means there are unpublished changes.
Why do sign-in emails send people to the wrong page?
The Site URL or the redirect URLs don’t include your live address. On Lovable Cloud check More, Users, Settings, Advanced, Redirect URLs; on your own Supabase project, set them in its authentication settings.
My app shows no data for customers, only for me. Why?
The row level security policies let the owner in and not the customer. Review them in More, Database, Manage, Policies, and ask Lovable in the chat to fix the rule.
Where do I see errors from my published Lovable app?
Backend function, database and sign-in logs are in More, Settings, Logs. Errors on the pages themselves show in the browser’s developer console.