Getting Github Pages To Work With A Dreamhost Domain

melissa mcewen
2 min readDec 11, 2017

--

So there are a couple of articles on this but I found them all only mildly helpful. The result is my site went down for an hour while I was like OMG šŸ˜±. So Iā€™m writing this so you donā€™t have to have this same experience.

Here was my situation:

The documentation on this on Github is a certified documentation horror story and incomprehensible to normal or even experienced people. Basically you only need 4 things:

Set your dreamhost domain to DNS only ā€” this allows you to create the DNS Cname for WWW, otherwise you canā€™t do this.

Create a Cname record for www and add A records for the github pages domains. Your records should look like this:

Set your Github pages to the custom domain of www.yourdomain.com NOT yourdomain.com. This will create a CNAME file. Um donā€™t let your deployment process delete this!

OK here is the final step no one seems to have documented anywhere. www.yourdomain.com should now work, what about yourdomain.com? Itā€™s just easiest to redirect it at this point. Go to Dreamhost and click ā€œManage Domainsā€ then ā€œAdd Hosting to a Domain/Sub Domainā€ (I knowā€¦this makes no sense). Scroll down and youā€™ll see ā€œRedirect.ā€ This is what you need:

Woo hoo! It should work now!

--

--