Lessons

How to set a GoDaddy Domain to Use Github Pages

We will walkthrough setting up your domain that is managed by GoDaddy to point to Github Pages. This involves signing into your GoDaddy account, updating the DNS, updating Github Pages settings, and letting the apply.

Sign into your GoDaddy Account. Select on the domain you want to update.

Godaddy

At the top, go to DNS > Manage Zones.

Godaddy

You may need to search and select the domain again. Otherwise, you should be on the DNS page. Below is a copy of mine. The red is required to redirect the root domain (Ex. keithweaver.ca). The non-red highlighted records are for redirecting sub-domains. Additional Github pages, and in this case, app.keithweaver.ca, and docs.keithweaver.ca. I’ve listed the IPs to be copyed.

Godaddy

1 2 3 4 185.199.108.153 185.199.109.153 185.199.110.153 185.199.111.153

Where did these IPs come from? Step 5 in the Github Pages documentation.

Open your Github repository that hosts the web project. Navigate to the Settings tab. If you do not see a setting tab, you are not the admin of the project/organization. You must have your permissions increased. Once on the settings page, navigate to Pages on the left.

Godaddy

Start by publishing your site. This involves selecting a branch that will be public. Once published, you can add a custom domain.

Godaddy

And that should have worked! If you encountered an verify domain error, see section below. Otherwise, jump to Next Steps.

Verify Your Domain

I received the following error:

Godaddy

The reason I received this error is most likely because my domain is already in use. I’ve used it across multiple projects. As well, the DNS is probably still updating.

Github does provide us with steps to resolve. Open your Settings in the top right corner. Navigate to "Pages" on the left side. You are under your account settings, not the repository settings.

Godaddy

Select Add Domain, it will give you some verification codes.

Godaddy

Open GoDaddy records and add the verification codes.

Godaddy

Godaddy

If you still can't set the custom domain after it has been verified, then another one of repository's is already using the same domain. You will find it, and remove that custom domain. I needed to go through old projects and remove the custom domain. This resolved it for me.

Next Steps

Your custom domain is all setup. The next steps are simple, you should be Enforcing HTTPS.

Godaddy

This will take a few minutes to apply, but you should confirm in the next hour that it’s enabled. You will need to manually check the checkbox. For confirming changes, I recommend using an incognito window to access your site. If you already had a website, it may be cached, and you might not see the changes immediately. You can also do a hard reload (CMD + Shift + R).

That’s it, thanks for reading!