Pointing Domain to GitHub Pages

WordPress GitHub Pages 0

So you have your dream domain, say my-domain.com, you also have a page on GitHub, say my-github.github.io/my-repo and you’d like to resolve my-domain.com to my-github.github.io/my-repo. How can this be done? Easy… just read on, it’s a 4 step process…


Step 1 – GitHub Pages Setup

  1. Login to GitHub
  2. Navigate to your Repository
  3. Go to Settings
  4. Scroll down to GitHub Pages section
  5. Fill in the Custom domain box with your domain my-domain.com
  6. Make sure the Enforce HTTPS box is checked
  7. Click Save

WordPress webconfig


Step 2 – Your Domain Provider Setup

  1. Login to your Domain Provider
  2. Navigate to DNS Management section
  3. Create 4 A Records pointing to the following IP Addresses
    • 185.199.108.153
    • 185.199.109.153
    • 185.199.110.153
    • 185.199.111.153
  4. Save these DNS entries

WordPress webconfig


Step 3 – Go back to GitHub

  1. Wait few moments, normally 5-10 minutes
  2. Go back to your Repository settings then GitHub Pages
  3. You should see green tick confirming your site is now published at your domain my-domain.com
  4. Make sure that Enforce HTTPS is also ticked

WordPress webconfig


Step 4 – Browse to your Website hosted on GitHub Pages

  1. Simple, open browser and navigate to my-domain.com
  2. It’ll now resolve to you GitHub Page

If your GitHub Page is themed with Jekyll then you might also be interested in how to modify the theme. In order to do so please read my Custom Styling Jekyll Themes article explaining just that.

And if you need to link your Google Analytics with your Jekyll GitHub Pages then please read my article on Adding Google Analytics to Jekyll GitHub Pages.

Marcin Narloch

Marcin Narloch

Creative and out-of-the-box thinker with strong interests and knowledge in technology and innovation.
WordPress GitHub Pages 0 Previous post Custom Styling Jekyll Themes
WordPress GitHub Pages 0 Next post Adding Sitemap to Jekyll GitHub Pages

Leave a Reply

Your email address will not be published.