Domain has already been taken

I used GitLab Pages for a bit but then deleted the repo and all the DNS entries for my domain. I decided I want to use it again so I set up and added my domain ( but it gives me an error: “Domain has already been taken”. I deleted the repo a few weeks ago so it can’t be cache and like I said I deleted the DNS records. How do I use my domain with GitLab pages again?

Me too! I’d love to hear any answer to this. I’m also not seeing responses to similar questions in older threads. Thanks in advance for any help.

Waiting for someone to answer this question because i am also facing similar kind of issues with tennis trainer websites.

still there is now update or any help form any one how to regain access of domain.

The domain is now working. I didn’t make any changes, so if I had to guess, it’s something to do with the LetsEncrypt certs expiring. Until they’ve expired, you can’t use the same domain. That’s a total guess though.

How long it took to get it working again? I have waited several days already and nothing, any official workaround from gitlab?


It was a lot more than several days – closer to a month, probably more than that even. I’m not sure how long LE certs last by default but iirc it was ~90 days? If so, then until that time is up, if my initial guess about this being because of the certs is right.

I haven’t heard any official workarounds from GitLab.

Thanks for replying sseneca. I think that a month or more is just too expensive to wait, time-wise. I really prefer gitlab over github, but for this particular item I will go with github. They offer a similar pages feature and seems to work just fine (including the SSL certificate).

Hope gitlab can fix this at some point,

Hi, I have had the same problem and found a solution. It appears that when a custom domain is deleted using the Pages tab in Settings the record is not deleted from the gitlab database. So when you try to re-establish the domain, Gitlab believes the name is in use. To fix this I used the rails console to search for records containing the domain name.

sudo gitlab-rails console

( Be aware that the rails console will not prevent you damaging your installation. Take care! )

PagesDomain.find_by!(domain: "")

If the domain is found you’ll see a record like this:

=> #<PagesDomain id: 14, project_id: nil, certificate: [FILTERED], encrypted_key: [FILTERED], encrypted_key_iv: [FILTERED], encrypted_key_salt: [FILTERED], domain: "", verified_at: "2020-11-04 09:45:07", verification_code: "a8ce081b9c0a6113a532778379b59c31", enabled_until: "2020-11-11 09:45:07", remove_at: nil, auto_ssl_enabled: false, certificate_valid_not_before: [FILTERED], certificate_valid_not_after: [FILTERED], certificate_source: [FILTERED], wildcard: false, usage: "pages", scope: "project", auto_ssl_failed: false, key: nil>

You could delete this record but I thought it safer to just modify the domain name:

PagesDomain.find_by!(domain: "").update!(domain: "")

You’ll now find the the web settings page allows you to create the domain. Good luck!

No, its not possible for users to do this on You would have to contact their support team.

How is this still a bug in

This is ridiculous to have such a recurrent bug for this long.

This bug is still here…