Using a Custom Domain with GitHub Pages

Invalid DateTime

Update [05/13/2014]: Using this method may cause slow load times

As you may have noticed, as of last week this site uses a custom domain, but the content is being stored by GitHub. I seem to be playing around with my domains and where they point to a lot and I also always forget how to configure my domain when I actually need to change it. This post is for both you and my future self.

Resources You’ve Probably Already Found

This post is going to demonstrate how I got and to point to my personal GitHub Pages site and also the required settings to forward to my new site as well.

On the GitHub Pages Side

You’re going to want to create a file named CNAME at the root of the project and inside that file you’re going to put your bare domain. In my case it was not

On the Domain Side

As a personal sidenote, I use Hover (referral link) for my domains.

Relevant for Hover users: How to: Edit DNS records - A, CNAME, MX, TXT, and SRV : Hover Help Center (@)

First, delete any A, AAAA, or CNAME records that use @ for the hostname. Then, create two A records. The hostname for both of them is @ which refers to your top-level (apex) domain. The values at the time of writing are and, but I’d check the ”My custom domain isn’t working | GitHub Help” page to verify that the IP addresses haven’t changed. (www)

Next, I created a CNAME record with the hostname www and for the value.

* (*)

Another issue I ran into is that subdomains (which I no longer utilize) were directing users to a page served up by Hover. To solve this issue I deleted out any previous records with the hostname * and created a new CNAME record with the hostname * and as the value.

This brings users to a GitHub Pages 404.html, not my 404.html page. I believe without being able to utilize a .htaccess file there’s nothing I can do about this, but if you know otherwise, please let me know. (Forwarding)

This might be a little Hover specific, but after navigating to the management of, I clicked “Edit” in the “Forward This Domain” row. I put in the text field and chose not to enable stealth redirection.

This means the URL will change in the browser’s address bar. Now and forward to my new domain and any navigation tacked onto the end of the URL will be passed through. For example, forwards to my new blog and not just

On Your Side

After I had configured everything correctly, pages were being routed correctly after about ten minutes. It can take up to a full day for things to go into effect though, so don’t lose hope and be sure to empty your browser cache.