GitLab pages domain redirects to main domain


I’ve been trying to get GitLab pages working but to no avail; it’s not working like the documentation says it should. Below is my current configuration.

I’m using most the most basic configuration for pages. However, when I deploy a basic HTML site, the URL generated redirects to my main GitLab domain rather than staying on domain defined for pages.

http://<namespace>.pages.domain.tld/hello-world redirects to https://git.domain.tld/hello-world

I have tried binding the subdomain to its own IP which just returns 502 Bad Gateway if I use it in conjunction with gitlab_pages['external_http']. I’m at a loss, there’s nothing visible in the logs that tell me what’s wrong, but I feel like it’s something dead simple.

I have even tried the same configuration with TLS disabled and the redirect still occurs.

1 Like

Same here

Hi! If you read the first bullet of the requirements, it says:

Have an exclusive root domain for serving GitLab Pages. Note that you cannot use a subdomain of your GitLab’s instance domain.

Have you tried with a different domain?