Unslop

Lovable hosting: deploy your Lovable app to Vercel with a custom domain

Where to host a Lovable app, and how to deploy it to Vercel: connect GitHub, set environment variables, and point your custom domain at it.

Updated

Short answer: you can keep hosting on Lovable and connect a custom domain there, or host the app yourself. To move to Vercel, connect your Lovable project to GitHub, import that repository into Vercel as a Vite project, add a rewrite so page links work, then add your domain in Vercel and update your Supabase auth URLs.

Where can you host a Lovable app?

Lovable's built-in hosting. Click Publish and the app goes live on a lovable.app address. You can connect a custom domain from the project settings (depending on your Lovable plan). This is fine for a first launch, a demo or an internal tool: there is nothing else to set up, and publishing is one click.

Your own host, like Vercel or Netlify. A Lovable app is a Vite single-page app, so any static host can serve it. This is worth it when you want a preview deploy for every change, one-click rollbacks, your own redirects and headers, or hosting that is not tied to the tool you build with.

Either way, the backend does not move. Your app keeps talking to the same Supabase project, so changing hosts does not touch your data. The rest of this guide covers the Vercel route.

Step 1: connect Lovable to GitHub

In Lovable, open the GitHub integration and connect your project. Lovable creates a repository and keeps it in sync both ways, so you can keep building in Lovable after you deploy.

Step 2: import the repository into Vercel

  1. In Vercel, choose Add New → Project and import the repository.
  2. Vercel should detect Vite. The build command is npm run build and the output folder is dist.
  3. Add environment variables if your code reads any (anything starting with VITE_). Many Lovable projects put the Supabase URL and public key straight in src/integrations/supabase/client.ts, in which case there is nothing to add.
  4. Deploy.

Step 3: make page links work

Lovable apps are single-page apps. Without a rewrite, refreshing a page like /dashboard gives a 404. Add a vercel.json file at the root of the repository:

{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}

Step 4: add your domain

  1. In your Vercel project, open Settings → Domains and add your domain.
  2. Vercel shows the DNS records to create. Add them at the company you bought the domain from.
  3. Wait for the check to turn green. HTTPS is set up for you.

Step 5: update Supabase auth

This is the step people miss. In Supabase, open Authentication → URL Configuration. Set the Site URL to your new domain and add it to the Redirect URLs. Otherwise sign-up emails, password resets and Google login will send people back to the old preview address. The same applies if you connect a custom domain in Lovable instead.

Before you send real users there

  • Check RLS is on for every table. See our RLS guide.
  • Check no secret keys are in the browser. See our exposed key guide.
  • Turn on Supabase backups and test that you can restore one.