This is one of the most confusing moments in a Lovable project. You test everything in the preview, it works, you press Publish, you open the live link and something is broken. A blank page, a login that loops, a form that does nothing, or data that simply does not show up.
Short answer: the preview and the live site are two separate copies of your app. The preview always shows your latest edits. The live site only shows what you published, and it runs under slightly different conditions: a different address, real visitors who are not logged in, and browsers that remember old files. Nearly every "works in preview, fails live" problem comes from one of those differences.
How to tell which problem you have
Before changing anything, open the live site in a private browser window and note exactly what you see. Then match it to the list below.
- Old version of the page. You see text or design from before your last changes. Go to cause 1 or 2.
- Blank white page. Nothing loads at all. Usually cause 2 or 3.
- Login bounces you back to the start. Cause 4.
- Page loads but lists are empty. Cause 5.
- Works on the lovable.app link, fails on your own domain. Cause 6.
Cause 1: you did not publish the latest version
This sounds too simple, but it is the most common one. Edits in the chat update the preview instantly. The live site stays frozen at the last time you clicked Publish, then Update. If you made ten changes since then, visitors see none of them.
The fix: open the Publish menu and check whether it offers an update. If it does, press it and wait a minute. Then reload the live page in a private window. If you have a habit of publishing once and forgetting, make it part of your routine to publish at the end of every working session.
Cause 2: your browser is showing old files
Browsers keep copies of websites to load them faster. After an update, your browser can mix old files with new ones, which sometimes produces a white screen that nobody else sees. A useful clue: if the site works in a private window or on your phone, cache or an old session is a likely cause, though a browser specific bug is still possible.
The fix: do a hard reload (Ctrl plus Shift plus R on Windows, Cmd plus Shift plus R on a Mac), or clear site data for that address in your browser settings. You do not need to change the app. If real visitors report it too, give it a few minutes after publishing, because the old copy expires on its own.
Cause 3: a secret or setting only exists in one place
If your app talks to an outside service such as Stripe, an email provider or an AI model, it needs a key to do that. Keys are stored as secrets, not in the code. When a feature that depends on one works in preview but fails live, check that the secret is saved and that the live version was published after you added it.
A prompt that usually finds the issue in one step:
"The checkout button works in preview but on the published site it shows an error. Check which secrets this feature needs, confirm they are set, and tell me if anything only works in preview."
Cause 4: the login sends people back to the preview address
Sign in with Google or a magic link email has to know where to send people after they log in. If that return address was set up while you were testing, it can still point at the preview. On the live site that shows up as a login that seems to work and then drops you back on the start page, logged out.
The prompt to use:
"After Google sign in on my published site I land back on the homepage logged out. Make sure the login redirect uses the current site address, not a fixed preview URL, and that it also works on my custom domain."
If you use a custom domain, test login on both the lovable.app link and your own domain. They are different addresses, and both need to be allowed.
Cause 5: database rules hide the data from visitors
In the preview you are usually logged in as yourself, the owner. Your database rules may let you see everything. A real visitor on the live site is often not logged in at all, and the same rules correctly hide the data from them. The page loads, the lists are empty, and there is no error message.
First decide what visitors should actually see. A public blog or product list should be readable by anyone. Customer orders should not. Then ask for exactly that:
"On the published site, visitors who are not logged in see an empty product list. Products should be public to read, but only admins can edit them. Update the database rules to match."
Never ask to simply turn the rules off. That fixes the empty list by exposing everything, including data that should stay private. Our Lovable database guide covers these rules in more detail.
Cause 6: the custom domain is not fully connected
If the lovable.app link works and your own domain does not, the app is fine and the problem sits in your domain settings. Typical signs: the domain shows a parked page from your registrar, a security warning, or works with www but not without it.
Check the domain status in the project settings. If it is still verifying, give the DNS records time, sometimes up to a day. If it shows an error, compare the records at your registrar with the ones Lovable asks for, character by character. The step by step version is in our custom domain guide.
A quick checklist before every publish
These five checks take two minutes and prevent most live site surprises.
- Click through the main pages in the preview while logged out.
- Confirm every outside service you use has its secret saved.
- Publish, then open the live site in a private window.
- Test login and one form submission on the live site.
- If you have a custom domain, repeat the login test there too.
When the live site shows a real error
Sometimes it is not a setup difference but a real bug that only appears with real data, for example a visitor with no profile picture or a product without a price. In that case copy the error from the browser console on the live site and paste it into the chat word for word, with the page and the action that caused it. Our guide to fixing Lovable build errors walks through that process and the prompts that resolve each error type without wasting credits.
FAQ
Why does my Lovable app show a white screen only after publishing?
Most often your browser is mixing old and new files. Try a private window first. If it still happens there, open the browser console and copy the error into the chat.
Do I have to publish again after every change?
Yes. The live site only updates when you press Publish, then Update. Chat edits change the preview only.
Does publishing cost credits?
Publishing itself does not use building credits. Credits are spent on the chat messages that change your app. See how Lovable credits work.
Why can I see data in preview but visitors cannot?
Because in preview you are logged in as the owner. Visitors are not, and your database rules decide what they are allowed to read.