I don’t make any money from this; I just recommend the tools and services I think are the best.
Step 2) Add your domain name to Netlify
2a) Log in to your Netlify account if you haven’t already.
2b) Head to the “Domains” tab.
2c) Click the “Add or register domain” button:
2d) Add your domain name (or intended domain name—you can have Netlify purchase it for you).
2e) Hit the green “Verify” button:
If you already own your domain, you’ll see the screen below. (If you don’t own your domain, and want Netlify to purchase it for you, this tutorial doesn’t cover that yet. I may add it in the future.)
2f) Hit the green “Yes, add domain” button:
Next, you’ll see the screen below.
There’s no need at this stage to add DNS records.
You can always do this later, for example, if you want to set up MX records for email.
However, for now:
2g) Hit “Continue”
Finally, you’ll see the screen below. Keep it open in your browser as you’ll need it in a second.
Step 3) Log in to your domain provider and update the nameservers to the ones you got in the last step
Every domain name provider’s interface is generally a bit different, so I won’t provide a screenshot here.
However, it should be relatively straightforward to find out how to change the nameservers for your domains at your provider (e.g. NameCheap, GoDaddy, Zuver etc).
You’ll need to update the nameservers to the ones you got in the previous step of this tutorial (which may be different to the above screenshot).
Once you have made these changes, it may take several hours to propagate through the DNS network.
Step 4) Deploy your site to Netlify
While you’re waiting for the nameserver changes you made in Step 3 to propagate, you may want to deploy your site to Netlify from your GitHub, GitLab or Bitbucket account. Here’s how to do that:
4a) Head to the “Sites” tab
4b) Hit “New site from Git”
You’ll see the screen below.
4c) Choose your Git provider (GitHub, GitLab or Bitbucket)
4d) You’ll then be asked to sign in to your Git provider via a pop up window (not shown here).
I use GitHub so the rest of this tutorial will focus on that. It should be pretty similar for GitLab or Bitbucket, though.
4e) You can then choose the repository containing your Hugo site.
4f) If you don’t see the repo in the list, you’ll need to configure the Netlify app in your Git provider (e.g. GitHub). You can click the green text link named “Configure the Netlify app on GitHub” to do so.
4g) Choose your branch (if not master).
4h) Specify the Hugo build command (I use hugo without any flags).
4i) Reference the location of the Hugo rendered HTML files (this will generally be public).
4j) Hit “Deploy” and you’re done! Once your DNS changes have propagated, your site will be live on Netlify.