How to renew the certificate for a custom domain

Problem to solve

I have to renew the SSL certificate for a custom domain. It is already working with a certificate, which is expiring in a few days. It is domain.xx.yy (third level domain), so I have asked xx…yy for the certificate, and I have it and the private key, both in PEM format. But I don’t see how to upload them to GitLab. By reading the docs I found that I can manage the certificate in the Pages page. But there I only see two possible ways of renewing my certificate:

  • Remove the current one (and then install the new one). But when I try, it says that I cannot remove it because I have the “force HTTPS” tick on, which seems reasonable, but prevents me from using this way.

  • Create a new domain with the same domain name, and then install in it the new certificate. But when I do that (and also install the private key) I get a 500 server error (!). So I cannot install it this way either.

So, how should I renew my curstom domain certificate.

Note: I’m not using Let’s Encrypt nor Cloudfare certificates, but a certificate signed by my second-level domain.

Steps to reproduce

See my comment above


See my comments above


Please select whether options apply, and add the version information.


I just had to use the real domain name, domain.xx.yy in the form to create a domain name, not https://domain.xx.yy


I tried opening a “new domain” several more times, and after several 500s more, I tried removing the domain and opening it again. But after removing it, I couldn’t create it again: more 500s.

Fortunately, at some point I realized that I was trying, for the domain name, https://domain.xx.yy … but that’s not a domain name. So, I tried the real domain name, domain.xx.yy… and it worked!

I think I was misled by the text you see as domain name once it is created, which is https://domain.xx.yy … So, I suggest, to help dumb people like me, to make it cleat in the form for creating a new domain that only the domain name, without https://* should be entered in the form.