| | |

Netlify 08 ๐ŸŒ Custom Domains & Netlify DNS โ€” Managing apex domains, subdomains, DNS records, and Let’s Encrypt SSL

โฑ๏ธ Estimated read: 8 min | |

Custom domains and DNS management are the final steps in making your web application publicly accessible under your own brand. While Netlify provides a default *.netlify.app subdomain for every project, production applications require a custom domain (e.g., example.com or docs.project.org) to build trust, handle SEO effectively, and ensure professional branding. Managing this infrastructure requires configuring DNS recordsโ€”the internetโ€™s phonebookโ€”to point your traffic to Netlifyโ€™s global load balancers.

Netlify offers two primary ways to manage your domain: by using Netlify DNS (where Netlify acts as your name server provider) or by configuring external DNS records at your existing registrar (like GoDaddy, Namecheap, or Cloudflare). Both methods achieve the same end result: routing your domainโ€™s traffic to Netlifyโ€™s CDN. Once connected, Netlify handles the heavy lifting of automated SSL/TLS provisioning via Let’s Encrypt, ensuring that your custom domain is secured with HTTPS without you needing to manage or renew certificates manually.

This chapter details the two approaches to domain management, the critical difference between Apex domains and subdomains, and the automated lifecycle of SSL/TLS certificates on the Netlify platform. We will explore how to troubleshoot DNS propagation issues and the best practices for achieving a “set-and-forget” domain configuration.

Key point: Connecting a custom domain involves two steps: configuring the DNS records at your registrar (to point traffic to Netlify) and confirming the domain within the Netlify Dashboard (to trigger SSL provisioning and traffic acceptance).


Why X exists

The branding requirement. A project.netlify.app URL is functional but does not carry the professional weight of yourbusiness.com. Custom domains are essential for SEO, email delivery, and user trust.

The SSL/TLS automation need. Managing SSL certificates (CSRs, private keys, renewals) manually is an administrative nightmare that risks site downtime when certificates expire. Netlify exists to automate this; as soon as a domain is verified, Netlify provisions a Let’s Encrypt certificate and handles all future renewals automatically.

The DNS routing problem. DNS was built decades ago, long before global CDNs existed. Apex domains (example.com) have technical limitations (they do not support CNAME records), and subdomains (www.example.com) are easier to manage. Netlify DNS simplifies this by providing an “Anycast” network that routes your users to the nearest CDN node regardless of your DNS setup.

The “Global Load Balancer” requirement. By pointing your DNS to Netlify, you aren’t just pointing to a server; you are pointing to a globally distributed network. Netlify’s DNS infrastructure automatically performs load balancing, health checks, and DDoS mitigation.

The trade-off. The trade-off is dependency. By using Netlify DNS, you are tightly coupling your domain’s availability to Netlify’s infrastructure. If you ever need to migrate away, you must perform a “DNS cutover,” which requires planning to avoid downtime and propagation delays.


a. Netlify DNS vs. External DNS

You have two choices for managing your domain. Netlify DNS involves changing your domain’s “Name Servers” (NS records) to point to Netlify. This gives Netlify full control over your DNS, allowing you to manage records directly inside the Netlify UI. It is the easiest “set-and-forget” approach, as Netlify will automatically configure the correct A and CNAME records for your project.

External DNS involves keeping your current name server provider (e.g., Namecheap, AWS Route53) and adding specific A (for Apex) or CNAME (for subdomains) records that point to Netlify’s IP addresses or load balancer. This is preferred if you need to manage other DNS records (e.g., for email/MX records) on a specialized provider.

# DNS Routing Logic
Netlify DNS: Registrar (NS Records) -> Netlify Name Servers -> Netlify CDN
External DNS: Registrar (A/CNAME) -> Netlify Load Balancers -> Netlify CDN

b. Apex Domains and Subdomains

The “Apex” domain (root, example.com) is notoriously tricky in DNS. CNAME records (which are the easiest way to point to a CDN) are technically invalid at the root of a domain. To support Apex domains, Netlify provides specific IP addresses (the “Load Balancer IP”) that you use in A records.

# Apex Domain Setup (A Record)
Name: @
Type: A
Value: 75.2.60.5 (Netlify's Load Balancer IP)

Subdomains (e.g., www.example.com) are simpler. You can use a CNAME record that points directly to your project.netlify.app URL. Using a CNAME is generally superior to an A record because if Netlify ever changes its infrastructure IPs, your CNAME record will automatically follow the update without you needing to change any DNS settings.

c. SSL/TLS Lifecycle

Once your domain is pointed to Netlify, the platform initiates a handshake with Let’s Encrypt. Netlify checks if the DNS records are correctly configured. If they are, it automatically requests a domain-validated certificate. This certificate is installed on Netlify’s edge nodes automatically.

The beauty of this system is that it is “self-healing.” Netlifyโ€™s internal systems continuously monitor the health of your certificate. If it nears expiration, the platform triggers a renewal request with Let’s Encrypt, downloads the new certificate, and updates it on the edge without any downtime or manual input from you.


Complete Example Session

# ============================================
# PART 1: DOMAIN VERIFICATION (EXTERNAL DNS)
# ============================================
# 1. Login to Netlify > Site Settings > Domain Management
# 2. Add custom domain: example.com
# 3. Netlify provides the A and CNAME records

# ============================================
# PART 2: CONFIGURE EXTERNAL REGISTRAR
# ============================================
# Go to Namecheap/Godaddy DNS Settings:
# Add A record: @ -> 75.2.60.5
# Add CNAME record: www -> example.netlify.app

# ============================================
# PART 3: NETLIFY DNS SETUP (ALTERNATIVE)
# ============================================
# 1. Login to Netlify > Domains > Add Domain
# 2. Netlify provides Name Servers:
#    dns1.p01.nsone.net
#    dns2.p01.nsone.net ...
# 3. Update Name Servers at your Registrar

# ============================================
# PART 4: VERIFY PROPAGATION
# ============================================
# Use dig to check the records
dig example.com +short
# Should return: 75.2.60.5

# ============================================
# PART 5: SSL PROVISIONING
# ============================================
# 1. Go to Domain Management in Netlify
# 2. Click "Verify DNS" (if not automatic)
# 3. Wait for "Provisioning Certificate" status

# ============================================
# PART 6: HSTS/HTTPS ENFORCEMENT
# ============================================
# Under "HTTPS" section, ensure "Enforce HTTPS" is checked.
# This prevents non-secure traffic.

# ============================================
# PART 7: TROUBLESHOOTING
# ============================================
# Check for "DNS Propagation" issues
# (Use tools like `whatsmydns.net`)

# ============================================
# PART 8: REMOVE/REPLACE DOMAIN
# ============================================
# Remove domain from Netlify UI first!
# Only then update the Registrar records.

The example demonstrates the two primary domain connection methods (External DNS vs. Netlify DNS), the verification step, and the automated SSL lifecycle.


Quick Reference

DNS Record Strategy

Domain TypeRecordValue
Apex (@)A75.2.60.5
Subdomain (www)CNAMEproject.netlify.app

SSL Lifecycle

StepActionResponsibility
ValidationCheck DNS recordsNetlify
RequestContact Let’s EncryptNetlify
InstallDeploy to Edge NodesNetlify
RenewCron-based renewalNetlify

Domain Management Options

ChoiceProsCons
Netlify DNSAutomatic, EasyVendor lock-in
External DNSFlexible, PortableManual updates

Best Practices

โœ… Do This:

# Use CNAME for subdomains whenever possible         // โœ…
# Use 'A' records only for the root Apex domain      // โœ…
# Always enable "Enforce HTTPS"                      // โœ…
# Wait 24-48 hours for full DNS propagation          // โœ…
# Verify using `dig` or `nslookup` tools             // โœ…

โŒ Don’t Do This:

# Point Apex domain to a CNAME (invalid DNS)         // โŒ
# Forget to remove old records when migrating        // โŒ
# Panic if SSL takes an hour to provision            // โŒ
# Use multiple conflicting A records for one host    // โŒ
# Forget to verify in Netlify UI after DNS update    // โŒ

Common Pitfalls

PitfallWhy It HappensFix
Certificate ErrorDNS not propagated yetWait 1 hour, check UI
Site not loadingCached DNS on local machineClear DNS cache (ipconfig /flushdns)
Apex pointing errorUsing CNAME for rootUse A record (75.2.60.5)
Redirect loopMismatched SSL/Enforce settingsToggle Enforce HTTPS off/on

Real-World Examples

1. Professional Business Site

business.com using A record, www.business.com using CNAME.

2. Documentation Portal

docs.library.org using CNAME pointing to my-docs.netlify.app.

3. Personal Portfolio

jane.dev using A record, managed via External DNS.

4. Startup SaaS

Migrating from AWS Route53 to Netlify DNS for automatic SSL.

5. Open Source Project

project.io using Netlify DNS to manage all subdomains.


Visual

DNS Propagation Chain

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  REGISTRAR (Godaddy/Namecheap)               โ”‚
โ”‚  โ”‚                                           โ”‚
โ”‚  โ””โ”€โ–บ DNS RECORD (Pointing to 75.2.60.5)      โ”‚
โ”‚        โ”‚                                     โ”‚
โ”‚        โ–ผ                                     โ”‚
โ”‚  NETLIFY LOAD BALANCER                       โ”‚
โ”‚        โ”‚                                     โ”‚
โ”‚        โ–ผ                                     โ”‚
โ”‚  NETLIFY CDN (Your Site)                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

SSL Handshake

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  USER โ”€โ”€โ–บ HANDSHAKE (HTTPS) โ”€โ”€โ–บ NETLIFY EDGE โ”‚
โ”‚                                              โ”‚
โ”‚  (Netlify presents valid certificate)        โ”‚
โ”‚                                              โ”‚
โ”‚  (Certificate renewed automatically by       โ”‚
โ”‚   Let's Encrypt/Netlify integration)         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Summary

ItemValue
Apex RecordA (75.2.60.5)
Subdomain RecordCNAME
SSL ProviderLet’s Encrypt
SSL RenewalAutomated
DNS ProviderNetlify DNS or External

Key takeaways:

  • Use the correct records. Apex domains must use A records pointing to 75.2.60.5; subdomains should always use CNAME records for portability.
  • SSL is automated. Once DNS is correctly configured, you should never have to manually touch a certificate file or private key.
  • DNS propagation is real. It can take up to 48 hours for DNS changes to propagate globally; always check dig or whatsmydns.net before troubleshooting further.
  • Netlify DNS is convenient. If you want the easiest possible experience, point your name servers to Netlify and let them handle the records.
  • Enforce HTTPS. This is the final step in securing your domain; always ensure it is enabled in your domain management settings.

Remember: Your domain connection is the bridge between your brand and your application. Treat the setup with care, verify your records with command-line tools, and trust in the automated SSL pipeline. Once configured, it is designed to run indefinitely without intervention.

Was this helpful?


Stop using slow, ad-bloated tool sites! ๐Ÿคฎ

๐Ÿ”Ž Search “KandZ Tools” on Google to use many professional utilities for free.

KandZ.me is the ultimate minimalist hub for:
โœ… Finance (Mortgage, Interest, Inflation)
โœ… Tech (Base64, JSON, Dev Suite, IP)
โœ… Health (BMI, BMR, TDEE)
โœ… Productivity (Timer, Workspace, QR)

โšก๏ธ Fast & Private
๐Ÿ”’ No data leaves your device
๐Ÿ’Ž 100% Free

๐Ÿ”— Use it now: https://tools.kandz.me
๐Ÿ”– Bookmark itโ€”youโ€™ll need it later!