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:
- 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.
- Skip to this part, obtain the verification code.
- I use Gandi for my domain. There, I added the following records:
@ 10800 IN TXT "gitlab-pages-verification-code=..."
www 10800 IN TXT "gitlab-pages-verification-code=..."
- 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.
- Wait until the new records propagate, checking it with these commands:
dig +short gkayaalp.com txt
dig +short www.gkayaalp.com txt
- Verify the domains from the GitLab project’s Pages view.
- Follow this tutorial, except use Debian package
certbotinstead of cloning the letsencrypt repository.
- The command:
certbot certonly --work-dir . --logs-dir ./logs/ --config-dir ./config/ -a manual -d DOMAIN
- Asks you to add a plain text file at a certain path in the website, with certain contents, do that.
- The command:
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 126.96.36.199 @ 10800 IN TXT "gitlab-pages-verification-code=..." www 10800 IN A 188.8.131.52 www 10800 IN TXT "gitlab-pages-verification-code=..."
Notice the identifiers are
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.
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.