Configure Custom domain name & SSL certificate for a Netlify website

I wanted my Netlify hosted website to have a custom domain name. Since I wont be doing this process daily, I might forget this process and I don’t want to waste my time on searching for a how-to.

First make sure that you have a website and you hosted it via Netlify.

Go to the site overview of the site which you want to add the custom domain and select Domain settings

Now click on add a custom domain option, you will se a section like this 👇

Add the domain name in the input box and click on verify. After the verification, Netlify will show a prompt regarding the domain is already registered. You are now ready to click on the option Add domain

After this, we need to verify the DNS configuration. Go to the website where you purchased the domain and click on name servers. In my case I used Freenom. So Login to Freenom > goto My domains > Click on Manage Domain > Under Management tools > Click on Nameservers .

You will be provided with 2 options, We are going to use the second one i.e Use custom nameservers

Go to Netlify, click on verify the DNS and copy the list of DNS server names and go back to Freenom and paste the server names one by one in the list of input boxes they offer.

Once you save the configuration for the Nameserver, then Netlify will automatically reflect the changes and now the custom domain will direct to the Netlify site.

FYI: This section is optional

Now lets add SSL certificate for the Freenom site. By default Freenom will use Let’s Encrypt and It will not be renewed every time when you renew your Freenom domain. I faced this issue and that’s why I’m adding this section as well.

Let’s head to Cloudflare. Create an account and click on Add site option and add the domain name that you have purchased in the input box shown.

After adding the site, Cloudflare will ask you to select a plan, Click on the Free plan and proceed next. Now you will be asked to review the A, CNAME, ALIAS, and URL records. I think the default configuration is fine, Click continue.

Now you will be asked to remove the Nameservers that you have already configured in the Freenom site.

After removing it, you can replace the existing Nameservers with the Cloudflare’s Nameservers. By doing so we get to enjoy Cloudflare’s security features.

🎉 Now the configuration is done and enjoy the benefits of a Website with Fast, Easy-to-use DNS, Unmetered DDoS Protection for Layers 3–7, CDN, Universal SSL Certificate, Free Managed Ruleset and a free domain name.

If you find this useful, please do support me by sharing it with others and a clap. 👋

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store