Custom-Domains and GitHub-Pages: Configuration for

Posted on Mo 21 September 2015 in Blog

Recently, I rebuilt my homepage using the great Pelican-Framework together with GitHub's Page Hosting capabilities.

While building and hosting a website as a GitHub User-Page is pretty straightforward, I struggled with the setup of a custom-domain using my my domain-provider

Based on some helpfull SO-Threads, I finally managed to set up a custom-domain for the blog.

As doesn't really follow the usual terms and labels in their user-interface, creating the respective A-records (in case you use an apex domain like!) wasn't that obvious. Thus, here is a screenshot of the configuration for

There are basically three steps involved to use a custom (apex) domain for your GitHub User-Page:

  1. Create a CNAME file in the Master-Branch of your GitHub-Repository. This file should contain your custom domain, without the scheme (http://) and will cause GitHub to serve your content to that domain (at least as I understood it, having no or just a very basic background in Hosting/DNS-related stuff).

  2. In the checkdomain user-interface, adjust the IPv4-Adress to GitHub's current IP-Address, in this case: Configuration
Note: I only used a single A-Record via "Allgemeine Einstellungen". Entering the other IP in the DNS-Table below as an A-Record seems to create another redirect. The settings in the checkdomain user-interface are quite confusing here, f.e. no root-apex (@) can be specified. There is no further description available.

  1. Enter a CNAME-Record at checkdomain for the "www"-subdomain. The target should be (note the trailing slash!)

You might check the redirects and DNS settings via the dig-command, or use this online-tool to test the correct settings. Updating the records may take a while, and be sure to reset Chrome's DNS and Website-Cache to test your settings.