Pages custom domain is "already taken"

I haven’t been able to find any viable solutions to this so far in the forums.

I paired a custom domain with a Pages repo and have since deleted the repo. I am trying to add the domain to a different repo now and am getting the “Domain name is already taken” error.

Unfortunately the only solution I found was to wait for the “Let’s Encrypt” certificate to expire.

Am I completely unable to use this domain with Pages now?

Hi @jersker,

I wonder whether someone else registered that domain? You could check with SSL Checker or a similar tool (GitLab registered domains will resolve to 35.185.44.232).

Also, I’m assuming that before you tried to link your domain with the new repo, you removed all the DNS settings that GitLab asks you to add to the domain config for verification and so on.

If all that looks good, and you are on the free tier of GitLab (and so you can’t raise a support ticket), then you could have a go at trying to move back to a known state. Personally I would:

  1. Un-delete the old repo.
  2. Deploy something (anything!) to GitLab pages in the old repo.
  3. Connect the domain to GitLab pages in the old repo.

If that works, you can remove the domain from Pages (and the DNS config that went with it), then you can try adding the domain to pages in your new repo.

If none of that works, I would guess maybe you’ve triggered a bug somewhere…

1 Like

I have exactly the same problem. Old repo has custom domain, that repo was deleted, and now a new repo cannot connect to this custom domain. I am not using gitlab to obtain SSL, so I am pretty sure this problem has nothing to do with SSL expiration.

Instead, the problem appears to be the way that Gitlab stores the custom domain in its pages server, and that it does not update the domain records when the repo is deleted. In Github there is a UI dialog for adding or removing pages. In Gitlab unfortunately there is no direct UI, and pages are configured as a side effect from running CI scripts. This makes it difficult to resolve pages changes directly by repo users, when the Gitlab page setup scripts still have bugs.

1 Like

Have you filed an issue for that @kaceo?

No, where is the appropriate place for that issue? I came to the forum because it is the only place I could find to raise support issues.

Hi @kaceo

this is the place for bug reports. I see there’s a bit of SPAM on that issues board at the moment.

The forum is great, but it’s mainly end-users here, whereas you seem to have found a bug in GitLab which a developer will need to fix.

You can search for issues related to pages like this and it looks like this issue may be reporting your problem, so you might want to upvote / comment on it.

Good luck!

Thank you, I have filed the comments under the issue you linked for me. I see it is an old bug (> 4 years) but low priority, hopefully it will get fixed soon. I wonder how long Gitlab hold on to my lost custom domain, would it be released eventually? Gitlab needs a way for users to see all the domains they have associated with their account, and UI to manage them explicitly.

Good question. This issue suggests a week. If you’re on a paid plan you could raise a support ticket.