Setting up GitHub Pages to use on Parking domains using GitLab

This is the English version of this article.

I’ve been using my own domain since 2007, and the domain for mailing list since 2013. I have a dedicated website for them, because I send emails from there, and thought web-accessible site would be a good idea.

Originally, I had a GitHub repository hosting code, and my own server’s apache was hosting it and cached aggressively by Cloudflare.

However, deploying code was not automated, thus I had to SSH into the server, and do git pull whenever I wanted to update the source. Also I once lost the source code, so I had to restart from the scratch. I decided to migrate to GitHub Pages because I didn’t want to do the manual pull. Anyway only resource for the site is index.html.

It is logical to think it’s primarily hosted on GitHub because it’s hosted with GitHub Pages, but its canonical source is on The only reason behind this is that GitHub web editor puts themselves as a committer, which I did not like. “OK, why don’t you use GitLab Pages then?” I could use GitLab Pages, of course, but I have to upload TLS certificates on my own, and the de facto standard of free TLS certificate in 2017, Let’s Encrypt, has certificate validity of 90 days, which means I have to practically renew every two months, and then upload it to GitLab, every time I do the renewal. That was a big, big hassle for me (as I want to take less care of the project). Thus, I just decided to let Cloudflare behave as a TLS proxy, and behind them, GitHub Pages will generate HTML pages.

  1. Create a new ‘project’1 on, and create a new repository1 for GitHub Pages on
  2. Put the source code in GitLab project, including CNAME. (Putting this in GitHub settings will mess up.)
  3. In the settings for the Project > Repository, set up repository mirroring to GitHub.
  4. In GitHub repository settings, set GitHub Pages to generate contents from master branch.
  5. Wait for GitLab to push to GitHub, and GitHub Pages to build the html files.
  6. Point Cloudflare to point at GitHub Pages.

The reason I decided on Cloudflare was I wanted to set HTTPS while using GitHub Pages. While I know Cloudflare’s Flexible SSL doesn’t do any privacy, the use case here is that the advisory wouldn’t be interested in this small website, so I just went on it.

I am seriously bad at design, so I made a website with just around 20 lines of HTML file, here.


  1. Project in GitLab == Repository in GitHub, if you didn’t know. 

Published by revi

Chief Laziness Officer

One reply on “Setting up GitHub Pages to use on Parking domains using GitLab”

Comments are closed.

%d bloggers like this: