How can I disable GitLab Pages default domain when using a custom one?


When using a custom domain for GitLab Pages, it seems that default domain (* is also active, so content is published in both domains at once.

How can I disable default domain? If there is an option, I can’t find it.

Thanks in advance. Kind regards.

As you are using then that is not possible. This link explains more: GitLab Pages custom domains | GitLab

In particular:

The site has to be deployed to the default domain. Also you will see on that same page but this section: GitLab Pages custom domains | GitLab that the DNS relies on a CNAME entry for your custom domain to point to your domain that Gitlab pages is using. Therefore it has to exist and be active, else your custom domain won’t work.

Is GitLab Pages DNS implemented significantly differently from Github pages in this regard? I have my personal tech blog hosted through Github pages, and if one were to try to go to my blog through its default URL, Github would automatically redirect it to my custom domain at

Is something like this not possible for GitLab Pages?