Redirect GitHub Page to Custom Domain Name Registered With AWS Route 53

I’m trying to use my own domain for this blog. I researched into pricing and server availability of different DNS service providers. Considering company reputation and customer service I choosed AWS Route 53. Besides, AWS Route 53 connects user request to other AWS infrastructure like EC2 instances (which I am using now), Elastics Load Balancer, AWS S3 bucket. AWS Route 53 partnered with Gandi. So don’t get surprised when you see Gandi’s information showing in your WHOIS site.

Next step, checked for availability of domain name. Tried with my first name and last name but no luck! After several attempt I tried with my email address maggie98choy.com. Good, this one had not been taken! I quickily registered with this name. I didn’t give second thought about the top-level domain name other than .com as this is most common one. AWS Route 53 charged $12/year for domain name registration.

Image

After registered for a domain name and verified my contact information, the domain name was up and ready. Redirecting my GitHub site to my own domain name was quite straight forward. Using a custom domain with GitHub pages provides good documentation on how to accomplished this.

Here’s the overview of the steps:

  1. Add a CNAME file in GitHub pages site repository and add a single line that specify custom domain name without http:// or https://
  2. Create CNAME type record set and specify value with GitHub page site (make sure no www in front of GitHub page site)

For checking if domain name CNAME is succeessfully updated simply type <<nslookup "domain name address with www in front">> in Terminal. CNAME was updated when returned result showed appropriate canonical name in Terminal. Enjoy seeing your GitHub site on your own domain name!

Written on May 3, 2016