Skip to content
VibecodeZero

Bolt preview works but the deployed site is blank (Netlify)

Updated First published

On this page (4)
  1. Symptom
  2. Cause
  3. Prompt to paste
  4. How not to burn credits

Symptom

The app works in Bolt's preview, but the published site, on a bolt.host or netlify.app address or your own domain, opens to a blank white page, with no text and no buttons.

Cause

This page is for one specific case: the app works in Bolt’s preview, you published it, and the live site is blank. If it’s the preview itself that won’t load, see Bolt preview not loading instead.

The facts here come from the Bolt Help Center pages on preview issues, publishing issues, Netlify for hosting, hosting, publishing your project and database secrets, and from Netlify’s docs on getting started with environment variables, the environment variables overview and environment variables with frameworks, all checked October 29, 2026. Publishing from your phone comes from Bolt’s official post on X of October 29, 2026, checked October 31, 2026. Bolt’s troubleshooting steps for white screens are written for the preview. We use them here because they’re the closest official steps, and we say where our advice goes beyond them. Menus change, so check those pages if something looks different. The Bolt button at the end of this page is a referral link: if you sign up through it, we may earn a commission, at no extra cost to you. The links to the docs are plain links. See how we make money.

Why the preview can work when the published site doesn’t

The preview runs inside Bolt. The published site runs on a host, Bolt hosting or Netlify, and Bolt’s docs say it only changes when you publish again. If the app needs a setting that the preview has and the published site doesn’t, like an environment variable, the published site can crash before it draws anything. Bolt’s docs say projects often show a white screen when required variables are missing. That’s a common cause, not the only one, so start with the error itself.

Step by step

1. Check where your site is published: Bolt hosting or Netlify

Look at the address. Bolt’s docs say new projects publish to Bolt hosting by default, at an address ending in bolt.host. If you chose Netlify instead, Bolt creates a netlify.app address the first time you publish. You pick the host under the gear icon → All project settings → Domains & Hosting → Hosting Provider.

Two quick checks on Bolt hosting: if you hit your plan’s hosting limit, Bolt says the site stops displaying publicly until your usage resets. And if you see “This site can’t provide a secure connection” instead of a blank page, that’s a different problem: see the FAQ below.

2. Open the browser console on the published site and copy the error

Open your published site, not the preview. Open the browser console, with the shortcuts from Bolt’s help center: Cmd+Option+J on a Mac, Ctrl+Shift+I on Windows. Reload the page so the blank screen happens again, then copy every error message in red.

You don’t need to understand it. If it mentions a Supabase URL, Bolt’s docs say (for the preview) that the project may expect a database connection that isn’t set up. Paste the error into Bolt with the prompt on this page.

3. Ask Bolt for the list of variables the app uses

Bolt’s docs suggest this prompt to find every environment variable a project needs:

Perform a full review of the project and list every environment variable the application requires. Include guidance on where each variable can be found so that I can add them to my setup.

The prompt on this page includes it, together with your console error. Send it in Plan mode, so Bolt explains before it changes anything. Bolt’s docs call managing environment variables “a more advanced task”, so take it one variable at a time.

4. Add the variables where the site is hosted, then publish again

  • On Netlify: Netlify’s docs say to create variables in the Netlify UI under Project configuration > Environment variables, or with the Netlify CLI. Netlify also says that variables set in a netlify.toml file override the ones in the UI, and that new variables only take effect after a new build and deploy. So, after you add them, publish again from Bolt.
  • On Bolt hosting: Bolt’s preview troubleshooting says you add variables in a .env file or in the Secrets menu (database icon → Secrets). Ask Bolt which one each variable needs. Secrets are for server functions and stay out of the browser.

Bolt’s docs don’t explain how a site published to Netlify gets its variables. So after you publish again, open the console on the live site one more time. If the same “missing” error is still there, paste it into Bolt and ask how this project gets its variables when it’s published to Netlify.

Never put a secret key in a variable that goes to the browser. Netlify’s docs say most frameworks need a prefix, like REACT_APP_ or NEXT_PUBLIC_, for variables used in the site itself, and that values embedded in the build can be read by anyone who inspects your app’s files. Those variables are only for values that can be public. A secret key, like a payment or AI provider key, belongs in server code, which in Bolt means the Secrets menu.

5. Still blank? Check that you published the latest version

Bolt’s docs say: “After you publish, changes you make to your Bolt project aren’t automatically applied to your published site.” To send your fixes live, open the Publish menu and click Update. More on this in The published link doesn’t show my latest changes.

Two more Netlify cases from Bolt’s docs:

  • Bolt failed to publish to Netlify. You can publish by hand: run the build command (usually npm run build), click Download, and follow Netlify’s drag-and-drop deploy instructions.
  • You duplicated or forked the project. The copy loses its connection to Netlify. Reconnecting creates a new Netlify site, so make sure you’re opening the new address, and point any custom domain to it.

App with a database or backend? Netlify can’t host that part

Bolt’s docs say Netlify can host sites that run entirely in a web browser, like landing pages, portfolios and small apps, but “can’t host a database or a traditional backend”, the parts that save things like user accounts or orders. If your project needs one, Bolt says to stay with Bolt hosting, which supports backends, with built-in databases from Bolt Cloud.

To switch back, unpublish the Netlify site first (gear icon → All project settings → Domains & Hosting → Unpublish). Then, in the same place, pick Bolt Cloud in the Hosting Provider dropdown, close the settings and click Publish twice. Bolt’s docs say custom domains don’t carry over between Bolt and Netlify automatically. For a wider look at hosts, see Where to host a vibe-coded app, and to understand what each prompt costs, Bolt tokens explained. If the blank screen is in another tool, see My app shows a blank screen.

Prompt to paste

Copy the text below, replace what’s in brackets and send it in the chat of the tool you’re using.

Paste into the AI
My Bolt app works in the preview, but the published site [on Bolt hosting / on Netlify] shows a blank screen.
This is the full error from the browser console on the published site:
[paste the whole error text]

Don't change any code yet. First explain in plain English what this error means.
Then perform a full review of the project and list every environment variable the application requires. For each one, tell me where the value can be found, where it must be set so the published site gets it, and whether it is safe for it to be visible in the browser.

How not to burn credits

  • Publish with the Publish or Update button in the Publish menu. Bolt's docs say these don't use tokens, while asking Bolt in the chat to publish does.
  • Paste the exact console error in one message. Bolt's help center says the exact error helps far more than a general "it isn't working".
  • Use Plan mode to find the cause before any code changes. Bolt's docs say Plan Mode helps save tokens by avoiding unnecessary rework.
  • Adding variables on Netlify is done in Netlify's own settings, not in the Bolt chat.
  • Don't send "still blank" over and over. If the same error comes back after a fix, paste the new console error, or stop and ask in Plan mode why the fix didn't work.

How Lovable counts credits, and what the free plan includes: Lovable credits explained.

Questions people ask

Why does my Bolt app work in the preview but show a blank page after publishing?

Bolt's docs don't name a single cause for this. They say a white screen can be a runtime error that Bolt can't detect on its own, and that projects often show a white screen when required environment variables are missing. The console on the published site shows which one it is. Also check that you published your latest version with Update in the Publish menu.

Does Bolt copy my environment variables to Netlify?

The Bolt docs we checked don't explain how a site published to Netlify gets its environment variables, so we can't say either way. Check the console on the published site after you publish, and ask Bolt with the prompt on this page where each variable must be set for your project.

Where do I add environment variables on Netlify?

Netlify's docs say to create them in the Netlify UI under Project configuration > Environment variables, or with the Netlify CLI. Variables set in a netlify.toml file override the ones in the UI. After you add or change them, you need a new build and deploy for them to take effect.

Can I put my API key in an environment variable?

Not in one that the build puts into your site. Netlify's docs say values embedded in the build can be read by anyone who inspects your app's files in the browser, and most frameworks need a prefix, like REACT_APP_ or NEXT_PUBLIC_, for those variables. Secret keys belong in server code. In Bolt, the Secrets menu (database icon → Secrets) stores them for server functions, so they never reach the browser.

Can Netlify host my Bolt app's database?

No. Bolt's docs say Netlify can host sites that run entirely in the browser, like landing pages, portfolios and small apps, but can't host a database or a traditional backend. If your project needs one, Bolt says to stay with Bolt hosting, which supports backends, with built-in databases from Bolt Cloud.

Can I publish a Bolt app from my phone?

Bolt says yes. Its official post on X of October 29, 2026 says its mobile experience now has full-screen previews after every prompt, one-tap sharing and publishing right from your phone. We haven't found an official help page with the steps yet, so we can't say where the option is on the phone. If the published site is blank, the steps on this page are the same.

My bolt.host site says "This site can't provide a secure connection". Is that the same problem?

No. Bolt's docs say that error, with ERR_SSL_PROTOCOL_ERROR, usually means your network or internet provider is blocking .bolt.host addresses. Open the site with your phone's mobile data and any VPN off. If it loads there, your site is fine and the original network is blocking it.

New guides by email. An email when we publish a new guide, error fix or chapter, in plain English. Subscribe