Configure 1&1 domain for GitHub Pages Site

1 minute read

The process of setting up a custom domain name for a GitHub Pages website is straight forward, but it could be confusing if you haven’t setup a domain before. I will use 1&1 a domain name register to setup GitHub Pages website domain. The process should be similar using other domain registers such as GoDaddy.

Configure domain on GitHub

First we start by setting up the domain name on GitHub Pages repository. Under your GitHub repository settings, find GitHub Pages section then set Custom domain to your domain name and hit save.

Configure Subdomain CNAME

At this point your GitHub website is configured and ready to receive traffic from your domain register dns! The next step is to configure a subdomain for your website. Follow these steps:

  1. Login to your 1&1 account.
  2. Click Domains from left side menu.

  1. Click Manage Subdomains under your domain settings
  2. Click Add subdomain on the right side menu.
  3. Choose a name for your subdomain

If you would like to to redirect all traffic from root domain to your website, use www as your subdomain name.

  1. Click edit domain settings on the newly created subdomain.
  2. To setup a CNAME or a traget for DNS to forward traffic to, choose CNAME in A/AAAA and CNAME Records section
  3. Then enter your GitHub pages URL under Alias

Forward All Traffic

The last step before you’re all done, is to setup the main root domain to redirect to subdomain. In order to do that:

  1. Go to 1&1 domain control panel.
  2. Click on your root domain name
  3. Click on Forward to under settings
  4. Choose Redirect type to HTTP redirect
  5. Set your Redirect to destination to your subdomain name

Great! You’are all done.

More Info

Leave a Comment