How do I choose my primary domain?
Last checked 31 Aug 2026
Short answer
In Project settings → Domains, set which connected domain (e.g. root vs `www`, or which of several domains) is primary; Lovable serves and redirects other connected domains to that one.
Why you'd set a primary
If you've connected more than one domain — or both the www and root versions of the same domain — you generally want visitors and search engines to land on a single, consistent URL. The primary domain is the canonical one; other connected domains redirect to it.
Steps
- Go to Project settings → Domains.
- With multiple domains connected, look for the option to mark one as primary.
- Confirm the others (e.g. the
wwwversion, or an old marketing domain) redirect to it rather than serving duplicate content.
Set mydomain.com as my primary domain and make sure www.mydomain.com and my old lovable.app URL redirect to it.
Things to consider when choosing
- Branding: most businesses prefer the bare root domain (
mydomain.com) overwww.mydomain.com, though either is fine as long as it's consistent. - SEO: pick one and stick with it — search engines treat
wwwand non-wwwas different URLs unless redirected, which can dilute rankings if left unmanaged. - Existing links: if you've already shared or indexed one version widely, keep that one primary rather than switching later and breaking existing links (redirects mitigate this but aren't a substitute for consistency).
What usually goes wrong
- Never setting a primary, leaving multiple live versions of the site with no redirect, which confuses both visitors and search engines.
- Changing the primary domain after launch without expecting a temporary dip in search visibility while engines catch up.
See how-do-i-connect-www-and-non-www-versions for setting up both variants before choosing between them.
Sources
Was this answer helpful?
Related questions
- 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.
- 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.
- AnswerHow do I change the social sharing image?Ask Lovable to update the Open Graph image, or edit the og:image meta tag in your page head and upload the image asset — this controls the preview card shown when your link is shared on social platforms.