Custom Domains and DNS
What You'll Learn
You'll learn how to connect a custom domain to your static site and configure the DNS records and SSL certificates needed to serve it securely over HTTPS.
Why Custom Domains Matter
When you deploy to platforms like Netlify or Vercel, you get a default subdomain (like my-app.netlify.app). A custom domain (like myapp.com) gives your site a professional identity and branding.
The DNS Connection Process
DNS (Domain Name System) acts like the internet's phone book—it translates human-readable domain names into server IP addresses. Think of it like entering a friend's name in your contacts app to find their phone number.
To connect your domain:
- Purchase a domain from a registrar (like Namecheap, Google Domains)
- Add the domain to your deployment platform's settings
- Configure DNS records at your registrar to point to your hosting provider
Common DNS Record Types
- A Record: Points your domain directly to an IP address
- CNAME Record: Points your domain to another domain (common for
wwwsubdomain) - ALIAS/ANAME: Like CNAME but works for root domains
Most platforms provide specific DNS values to enter. For example, Netlify might ask you to create an A record pointing to 75.2.60.5.
SSL Certificates
Your deployment platform typically handles SSL certificates automatically (using Let's Encrypt). This enables HTTPS, encrypting data between your site and visitors. Once DNS propagates (usually 24-48 hours), the platform detects your domain and provisions the certificate.
DNS Propagation
After updating DNS records, changes take time to spread across the internet's DNS servers. This is called propagation—like ripples spreading across a pond.
Key Takeaway: Custom domains require configuring DNS records at your registrar to point to your hosting platform, which then automatically provisions SSL certificates for secure HTTPS connections.