Gitlab Pages: Something went wrong while obtaining the Let's Encrypt certificate

I’m trying to deploy a super simple HTML / CSS website on Gitlab Pages on my own domain. HTTP version works fine, pipeline seems to be happy, website is served.

However, LE certificate cannot be automatically retrieved for some reason.

Something went wrong while obtaining the Let’s Encrypt certificate for [Retry button]

  • in project visibility settings, “Everyone” is setup for Gitlab Pages
  • domain is verified as my own
  • DNS records are setup with A record, alias and verification TXT records
  • no _redirects file is present
  • all requirements stated in docs seem to be satisfied

Repo structure:

$ tree -a -L 2
├── .git
│   ├── branches
│   ├── config
│   ├── description
│   ├── FETCH_HEAD
│   ├── HEAD
│   ├── hooks
│   ├── index
│   ├── info
│   ├── logs
│   ├── objects
│   ├── ORIG_HEAD
│   ├── packed-refs
│   └── refs
├── .gitlab-ci.yml
├── public
│   ├── assets
│   ├── images
│   └── index.html

.gitlab-ci.yml contents:

  stage: deploy
  - mkdir .public
  - cp -r * .public
  - mv .public public
    - public
  - main

Any ideas what might be wrong?

I think you’re best bet is to remove your custom domain, turn of SSL certificates, and then turn them back on and re-add your domain. If that doesn’t work, maybe consider raising a support ticket, if you’re on a paid plan.

If something has gone wrong between GitLab and LetsEncrypt, there isn’t much you can do about it from your repo, sadly, but you can start the process again and hope that it works a second time around.


I’ve tried that couple of times. HTTPS works fine without custom domain, however domain won’t receive the certificate.

Are you able to raise a support ticket?

No, Ma’am, I’m using free plan.


There are a few threads like this one on this topic. It seems to happen periodically.

It might be helpful if you can query your DNS and post the result here.

BTW do you have any other domains with GitLab pages? Did SSL work for any of them?


Finally! I’ve changed my DNS records couple of times, deleted IPv6 record, and now it works.

Yes, I have another Gitlab Page with LE certificate issued just fine.

Thank you for your help @snim2.


Really glad you got it sorted.

1 Like