Moved this website to GitLab Pages


Just moved this website to GitLab Pages. It was not butter smooth, but I'm happy with what I have now. A couple tips in the post.

This used to be hosted on NearlyFreeSpeech.NET. Now, it’s on GitLab Pages. The process to set up a Pages website with custom domains and Let’s Encrypt HTTPS is a bit involved. Below are the steps I took:

  1. Follow the Pages tutorial up until this point, add the A record to your DNS. I added an identical record for the www subdomain too.
  2. Skip to this part, obtain the verification code.
  3. I use Gandi for my domain. There, I added the following records:
    1. @ 10800 IN TXT "gitlab-pages-verification-code=..."
    2. www 10800 IN TXT "gitlab-pages-verification-code=..."
    3. Note that I added the naked domain and www as two different domains. I don’t know if this is the optimal way to do this, but works.
  4. Wait until the new records propagate, checking it with these commands:
    1. dig +short gkayaalp.com txt
    2. dig +short www.gkayaalp.com txt
  5. Verify the domains from the GitLab project’s Pages view.
  6. Follow this tutorial, except use Debian package certbot instead of cloning the letsencrypt repository.
    1. The command: certbot certonly --work-dir . --logs-dir ./logs/ --config-dir ./config/ -a manual -d DOMAIN
    2. Asks you to add a plain text file at a certain path in the website, with certain contents, do that.

After finishing all this, and letting things propagate a few minutes, I had my stuff set up. It was not as smooth as the above outline, though, because the Pages settings view on the GitLab repository mislead me by showing mistaken (or at least incompatible with Gandi.net) DNS entries. Had I figured this out the first time, it would’ve taken at most a couple hours to set this up. But as it was, it took about a day and a half, most of which was waiting for the TXT records to pop up. Below are the DNS records I added:

@ 10800 IN A 35.185.44.232
@ 10800 IN TXT "gitlab-pages-verification-code=..."
www 10800 IN A 35.185.44.232
www 10800 IN TXT "gitlab-pages-verification-code=..."

Notice the identifiers are @ and www, unlike what this image from the Pages tutorial suggests. I also ignored the CNAME record the same page suggested that I add, it did not cause any troubles.

This whole thing caused a couple days of downtime, sorry for that. The only downside for me now is that I won’t be able to have any analytics for this website. I used to use Webalizer with the httpd log files I fetched from NFS.net. I don’t think I can get any logs from GitLab now. I can use something that works with JavaScript, but I’d rather not. It’s not that important for me after all.

So, to conclude, I was able to move this blog to GitLab Pages with a process that’s rather simple and which should’ve taken a couple ours should I have figured out that the examples on GitLab were misleading.