GitLab Pages with custom domain redirects back to GitLab subdomain

I’ve set up a repository to use GitLab Pages Libby / · GitLab It’s a static Nuxt 3 site.

It’s visible here with no problems:

I set up a custom domain,, and verified it and everything looks good on the Custom Domain page. It’s been over a day since I last changed the DNS, so the changes have propogated. However, when I go to, I’m redirected back to GitLab instead of staying on

When I do a curl, I see that it’s a 308 Permanent Redirect. I don’t think it’s from Nuxt, since the Nuxt site is 100% static and no JavaScript is loaded. So I think it must be from GitLab somehow.

Can anyone help?

1 Like

Figured it out! The problem was that I had “Use Unique Domain” checked. When I unchecked that box, the domain stopped redirecting.


This didn’t work for me. It’s quite confusing, to be honest.

If I disable Use Unique Domain, it won’t generate a unique url (and I have more Pages under my GitLab group), so it breaks things.

If I enable it, I can see the gitlab generated Page url,

I verify my domain
And in AWS Route 53 I add a record with name and type A pointing to (because it must be an IP)
then GitLab can generate certificate without issues but when accessing
I get permanent redirection response and loads the gitlab unique domain page

I made an issue over here: "Use unique domain" causes a redirect back to subdomain when using a custom domain (#426435) · Issues · / GitLab · GitLab and linked your reply so they know about it!

Thanks very much.

It seems that now, for whatever reason, it worked with your advice to disable “use unique domain”

Probably DNS was caching something before

So, summarizing, for anyone having similar issue.

  • I have a group my-group with two repositories which use GitLab Pages.

  • One is called my-group/ and therefore it serves GitLab pages as a group website at, which is great.

  • The other (the problematic) is called my-group/foo-saas-website and I have configured a custom domain to it

  • I verified the domain at my AWS Route 53, DNS by adding the TXT record as instructed

  • GitLab requests properly SSL certificate so that I could access

  • I added a CNAME record in my DNS with name and value

And that works well right now. Funny thing, I didn’t even have to set any base =“/foo-saas-website/” to my index.html

Thanks for your help!

Crossing fingers tomorrow my website is still accessible!

1 Like