How do I connect a Cloudflare domain to Lovable?
Last checked 31 Aug 2026
Short answer
Add the DNS records Lovable gives you in Cloudflare's DNS panel, and set the proxy status to 'DNS only' (grey cloud) rather than proxied (orange cloud) so Lovable can verify and serve the domain correctly.
Steps
- In Lovable, go to Project settings → Domains and add your domain to get the required records (typically an A record and/or CNAME).
- Log in to Cloudflare and open your domain's DNS settings.
- Add the records exactly as Lovable specifies.
- Set each new record's proxy status to DNS only (grey cloud icon), not Proxied (orange cloud).
- Save, then return to Lovable and wait for verification.
Show me the DNS records to add in Cloudflare to connect mydomain.com to this project.
Why "DNS only" matters
Cloudflare's orange-cloud proxying routes traffic through Cloudflare's own servers first, which can interfere with the SSL certificate issuance and domain verification Lovable performs. Keeping the record as DNS-only (grey cloud) lets traffic go straight to Lovable's infrastructure, which is what verification expects.
What usually goes wrong
- Leaving records proxied (orange cloud), causing verification to fail or SSL errors after it appears connected.
- Cloudflare's "flattened" CNAME at the root domain behaving differently from a plain CNAME elsewhere — if the apex record doesn't behave as expected, try the exact record type Lovable specifies for root domains (often an A record).
- Existing conflicting records (like a placeholder A record) left in place alongside the new one.
If it still won't connect
Double-check every record matches exactly (no typos, correct TTL isn't usually the issue) and see why-isn-t-my-custom-domain-connecting for further troubleshooting.
Sources
Was this answer helpful?
Related questions
- AnswerWhat DNS records does Lovable need?Lovable shows the exact records to add when you connect a domain — typically an A record for the root/apex domain and a CNAME for `www` (or a subdomain), plus any verification record it asks for.
- AnswerDoes Lovable provide SSL?Yes. Every Lovable-published site gets HTTPS automatically, including the free lovable.app subdomain and any custom domain you connect through Lovable.
- AnswerHow do I publish a Lovable website?Click Publish in the top-right of the Lovable editor; it deploys your current version to a live `*.lovable.app` URL (or your connected custom domain) in under a minute.
- AnswerHow do I change the favicon?Ask Lovable in chat to update the favicon, and upload or link the image you want — Lovable will swap the icon file and reference it in the page head for you.