Gitlab.com Pages Let's Encrypt Something went wrong (HSTS domain, DNSSEC)

I am having trouble getting the Let’s Encrypt Integration working on Gitlab.com.

I have a private repository on gitlab called ptasev.gitlab.io which is my username (ptasev).

I then setup my domain (.page) using Google Domains to include the TXT record to verify, and also an A record pointing to 35.185.44.232. I also added a CAA record 0 issue “letsencrypt.org”.

I was successfully able to verify the domain however I get the message that automatic Let’s Encrypt certificate setup failed:
Something went wrong while obtaining the Let’s Encrypt certificate.

I’ve re-tried many times, and even deleted the domain, and re-verified to try again but nothing seems to work. I should note that *.page domains have HSTS required so it is useless without https. I also have DNSSEC enabled through Google Domains.

At this point I have no idea what else to do because the error message is very unhelpful. Does anyone have any suggestions?

1 Like

Well, I figured it out. It was a silly mistake I made.

I was creating my own repo from scratch and not using a template. I am using a simple html only site without any generators. The problem was that I forgot to push my commit with the public folder include the main index.html file. I had only made a commit without pushing.

After pushing the first commit with the public folder and the index html I was able to get a certificate. I also had to change the access controls so that everyone could see the page, although I’m not sure if that is required for a Let’s Encrypt certificate (I did that in Settings -> General -> Visibility, project features, permissions -> Pages).

I suggest that this information is added to the Let’s Encrypt troubleshooting documentation so that people don’t make the same mistake as I did:

2 Likes

Tried pushing again to master but no luck for me. Going to have to retry with a new repo I think.

I forgot to create .gitlab-ci.yml. After I did that, everything went smoothly.