HeadlinesBriefing favicon HeadlinesBriefing.com

Lovable Custom Domain Setup: A+TXT Records Explained

DEV Community •
×

When configuring a custom domain for a Lovable project, you'll encounter A+TXT records instead of the standard CNAME. The author chose a subdomain structure like `car-sharing-vs-rental-car.tool.tielec.blog` over the inverse, ensuring the hierarchy scales properly. This decision prevents awkward migrations later, as the first segment represents a category and the second the specific service.

Lovable uses a shared IP address for its edge/CDN, routing traffic via HTTP Host headers and TLS SNI—a common approach for platforms like Vercel and Netlify to conserve IPv4 addresses. The A record points to this entry point, while the TXT record verifies domain ownership, preventing hijacking. This method offers more flexibility than CNAME, especially for root domains.

The setup process involves adding the domain in Lovable, configuring the DNS records carefully, and waiting for propagation. Verifying the domain in Lovable then enables HTTPS automatically. The experience underscores a key engineering habit: double-checking assumptions, even for familiar tasks. Looking up details isn't a skill gap; it's a practical safeguard against mistakes and a way to stay current with platform-specific quirks.