paint-brush
Custom Domain on Github Pages Tutorial Using Namecheapby@mchisti
9,999 reads
9,999 reads

Custom Domain on Github Pages Tutorial Using Namecheap

by Mohammed ChistiAugust 20th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

This is a quick tutorial for if you already have a Github page and want to change your domain url from <code class="markup--code markup--p-code">username.github.io/repo</code> to <code class="markup--code markup--p-code">customDomain.com</code>. If you haven't already, buy a domain from <a href="https://namecheap.com" target="_blank"><em>Namecheap</em></a>, I recommend it since you usually pay around $1-10 for a year and the UI is beautiful.
featured image - Custom Domain on Github Pages Tutorial Using Namecheap
Mohammed Chisti HackerNoon profile picture

This is a quick tutorial for if you already have a Github page and want to change your domain url from username.github.io/repo to customDomain.com. If you haven't already, buy a domain from Namecheap, I recommend it since you usually pay around $1-10 for a year and the UI is beautiful.

Configure Github Pages to use a Custom Domain

First, go to your Github Page repo and click on Settings, then scroll down until you see Custom Domain. In the input box, type the domain name you just bought to set your Github Page too, e.g. [www.yourDomainName.com](http://www.yourDomainName.com.).

Lets return to the Code tab of your repo, you should now see a new file created, named CNAME.

If you don’t, then create a new file, name it CNAME, type www.yourDomainName.com in it, save and push it to your repo.

Configure Namecheap DNS Settings

Lets get your domain to point to your Github Pages server.

Go to Namecheap, click Domain List in the navigation bar, then click manage next to your domain url and then click Advanced DNS.

Now create the following records I have listed from the picture below, except replace seeyouspacecowboy.github.io with yourGithubUsername.github.io.

The Wait game

You’re all set and all you have to do is wait anywhere from 5–30 mins for it work.

Thanks for reading! Please share and recommend to other interested readers!

Check out my portfolio http://mohammedchisti.com. (Hosted on Github Pages and domain bought from Namecheap) :p