Skip to main content
← Blog
AI WebsitesDeploymentLovableBoltCloudflare

How to Put a Lovable or Bolt Site on Your Own Domain (Step by Step)

Zeisler Milán Updated
How to Put a Lovable or Bolt Site on Your Own Domain (Step by Step)

You described a website to an AI tool, it built one, and the preview looks fine. Then you try to put it on yourbusiness.com and things stop making sense. The tool gives you a preview link on its own domain, your registrar wants DNS records, and nobody explained how the two connect.

This is the route I use when a client brings me a Lovable, Bolt or v0 project that needs to go live. The tools differ in the details, and the first thing to find out is which kind of project you have.

Check which kind of project you have

Open package.json in the project.

  • It lists @tanstack/react-start. This is a TanStack Start app with server-side rendering, which Lovable uses for apps created from 13 May 2026 (22 June 2026 on Enterprise). It needs a host that runs a server. Static file hosting alone is not enough.
  • It is a React app built with Vite, without that package. This is what older Lovable apps are. It builds to static files.

The steps below say where the two differ. If your project is neither, follow the build instructions of its framework.

1. Get the code out of the tool

Before anything else, get a copy of the code that you control. Most of these tools can sync a project to a GitHub repository. Do this first, even if the tool can publish directly. A repository means you own the source, you can hire someone to work on it, and you are not locked into one platform’s hosting.

2. Check that it builds on your machine

Clone the repository and run the install and build commands from the project. In a typical project that looks like this:

npm install
npm run build

If the build fails here, it will fail on any host. Fix it now. Common causes are missing packages, TypeScript errors the preview ignored, and files that were renamed with different capitalisation.

3. Pick a host

For a static site or a single-page app, a static host is enough. A TanStack Start app also runs on these three when they build it from your repository. Several have a free tier that covers a small business site:

  • Cloudflare Pages: free, fast, and DNS can live in the same account.
  • Netlify: simple Git-based deploys, built-in form handling.
  • Vercel: fine for React projects, and the natural home for Next.js.

If the project has a backend (a database, user logins), the front end can still live on one of these, but the backend usually stays where the tool put it, often Supabase.

4. Set the build settings

Connect the repository and tell the host how to build it. For a Vite single-page app:

  • Build command: npm run build
  • Output directory: dist

For a TanStack Start app, Lovable’s external hosting guide says that Cloudflare Pages, Netlify and Vercel are detected automatically when they build from the repository. Set the build command to npm run build and use Node.js 22. On Netlify and Cloudflare Pages, set the output directory to dist as well. On your own server or in a container, check that package.json lists nitro, then build and start it like this:

NITRO_PRESET=node-server npm run build
node .output/server/index.mjs

The server listens on port 3000.

5. Add your environment variables

This is the step that breaks most deployments. The app works in the AI tool’s preview because the keys are already configured there. On a new host they are missing, so the site loads but nothing that needs data works.

Look for a .env file or for references to import.meta.env in the code. Each variable needs to be added in your host’s settings. In Vite, variables that the browser needs must start with VITE_. Remember that anything in front-end code is visible to visitors, so a secret key does not belong there. Browser values are written into the files during the build, so build again after you change one.

6. Fix routing for single-page apps

This step is for the Vite kind only. A TanStack Start server handles routing itself, so skip the rule below for it.

You open the home page, click a link, and it works. Then you refresh on /pricing and get a 404. A single-page app has one real HTML file, and the host does not know that /pricing should load it.

On Cloudflare Pages or Netlify, a file named _redirects in the public folder solves it:

/*    /index.html   200

7. Connect the domain

Add your domain in the host’s dashboard. It will tell you which DNS records to create, usually a CNAME for www and either an A record or a CNAME-style record for the root domain. Add them where your domain’s DNS is managed.

DNS changes can take anywhere from a few minutes to several hours to spread. SSL certificates are issued automatically once the domain resolves to the host.

8. If you have email on the domain

Do not delete existing MX and TXT records when you change DNS. They keep your email working. Changing nameservers moves all of DNS at once, so copy your existing records first.

What this does not cover

Getting a site live is the first job. If it is online but missing from search, see how to find out why an AI-built site is not showing up on Google. A site that is live can still look like every other AI-generated page, load slowly, or have no SEO basics. I wrote about the design side in 10 fixes for an AI-built site that looks generic.

Stuck on one of these steps?

If the build fails, the domain will not connect, or the site loads blank, send me the repository link. I will tell you what is wrong, and if you want, I will deploy it for you and hand it back with notes on how it is set up.

Get in touch about your AI-built site or read about the AI site cleanup and launch service.