Blog / AI-built apps
How to put your Lovable app on your own domain (and keep editing it)
You built an app in Lovable and it works. Now you want it on yourstartup.com, not a preview link, without losing the ability to keep building with prompts. Here is the route we use, and the three problems that catch most people.
Tools change quickly. Menu names below were correct when we wrote this; check Lovable's own docs if something looks different.
Step 1: Connect your project to GitHub
In your Lovable project, connect GitHub and let it create a repository. Lovable keeps the repo and the project in sync both ways: prompts in Lovable create commits, and commits pushed to GitHub show up in Lovable.
This step matters even if you never open the code. It means you own a full copy of your app, and any developer or hosting service can work with it.
Step 2: Choose where it runs
You have two options:
- Keep hosting in Lovable and add your custom domain in the project settings. Simplest, if your plan includes it.
- Deploy the GitHub repo to a host such as Vercel, Netlify or Cloudflare Pages. More control over caching, previews and costs, and no dependency on one tool.
For the second option, import the repo in your host and use the settings for a Vite app:
Build command: npm run build
Output directory: dist
Every push to the main branch, including the ones Lovable makes, then deploys automatically.
Step 3: Fix page refreshes (the 404 problem)
Lovable apps are single-page apps. Visiting / works, but refreshing /dashboard can return a 404, because the host looks for a file that doesn't exist. Tell the host to serve index.html for every route:
- Netlify: add a file
public/_redirectswith the line/* /index.html 200 - Vercel: add a rewrite of all paths to
/index.htmlinvercel.json - Cloudflare Pages: works by default as long as the project has no top-level
404.html
Step 4: Point your domain
Add the domain in your host's dashboard. It shows you the DNS records to create at your domain registrar, usually a CNAME for www and an A or CNAME record for the root domain. SSL certificates are issued automatically once DNS is live, usually within an hour.
Step 5: Update Supabase login settings
This is the step most people miss. If your app uses Supabase login, the magic links and password reset emails still point to the old preview URL. In Supabase, go to Authentication → URL Configuration and:
- set the Site URL to your new domain
- add your new domain to the Redirect URLs
Do the same for any OAuth providers you use, such as Google sign-in, in their own consoles.
Before you send real users
A working app is not the same as a safe one. Before launch, check that each user can only see their own data, that no secret keys are in the frontend, and that backups are on. We wrote a separate 15-minute Supabase security check for exactly this.