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
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, but most of them generate the same kind of project: a React app built with Vite, with Tailwind for styling.

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 Vite 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, and 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 typical Vite project:

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

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.

6. Fix routing for single-page apps

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. 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.