How to host a site on Netlify with a custom domain for FREE — Step by Step Guide

A tutorial on how to deploy your static website to Netlify and use a custom domain for free

Push to GitHub. Netlify deploys. Simple and easy!

1. Create a Netlify account

Select your preferred OAuth signup method or use your email.

2. Create a new site with CI/CD

Now that you are a member of Netlify, you can see your dashboard. Select “New site from Git.” Select GitHub as your provider and choose the repo that you want to host.

3. Configure Your Settings

Here you can configure your options. Make sure your output build directory is dist/ and your build command is npm run build. Then click the Build your site button to continue.

4. Build & Deploy your site

Now it’s time to sit back and relax. You did your part let Netlify take care of the rest — it will only take a minute.

5. Site name

You’ll see that the URL is automatically generated by Netlify. You can update the URL in “Settings.”

6. Add custom domain

To add a custom domain via the web UI, go to your site’s Settings › Domain Management section.

7. Verify your domain

To add a custom domain, click Add custom domain at the bottom of the Custom domains panel and enter your domain name. Click Verify and the domain will be validated.

8. Configure DNS Settings

Use a DNS provider that supports CNAME flattening, ANAME, or ALIAS records for root domains and alias your root domain to [your-site-name].netlify.com

Create an A record pointing your root domain to our load balancer’s IP address 104.198.14.52

9. You site is live

Hurray! your website is live, up & running. It’s as easy as that. Just click on the domain link and see the magic.

Published by Dinesh Kumar