If you don't already own your domain, purchase one. Personally, I prefer https://domains.google.com.
Within Netlify, go to the site you want to add a custom domain to.
Custom Domainssection, click on
Add domain aliasbutton.
Type in your domain as
www.yourdomain.comand click the
Your new domain should now be listed in the
Custom Domainssection, but you will see that next to it is a warning sign with the text
Check DNS Configuration. Click on that text.
DNS Configurationwindow pops up telling you to point the
www CNAMErecord to Netlify.
Go to where you purchased your domain and find a way to manage the
DNSsettings. If it's in Google Domains, then go to domains.google.com and go to their
DNSsettings via the menu on the left.
Near the bottom of the page, under the
Custom resource records, scan it to see if there is any existing
CNAMEentries. If so, either update that or delete it.
Add a new
CNAMEentry with the following values:
DNS records can take up to 48 hours to propagate. So check again in about a day in the same
Custom Domains section and see if the text next to your custom domain has changed to something around
Click the text and Netlify will show you domains to use as nameservers.
Go back to where you purchased your domain and again, go to the
DNSmanagement settings. Within domains.google.com, we go to
DNSsettings and then the
For domains.google.com, we click on
Use custom name servers, add each domain that Netlify gave us (example is ns2.netlify.com), and click the Save button.
Since this is a DNS change, it can take up to 48 hours to propagate. So we play the waiting game again. Check again in about a day or so. When everything is working right, the
Netlify DNS text will show up next to your custom domain.
BONUS: Netlify automatically gives you a free SSL certificate even with a custom domain. This allows users to access your site via
https and keeps browsers from throwing users a warning around your site not being secure.
You can check this by going to the
SSL/TLS certificate section. It may take about a day again for this after you complete the name servers setup.
Now, you've got your custom domain on your site. Yay!