this post was submitted on 13 Sep 2024
6 points (100.0% liked)

gitlab

95 readers
8 users here now

Discussion surrounding the Gitlab product (both CE and EE.)

founded 1 year ago
MODERATORS
 

My Gitlab Pages site works well under domain.com but not under www.domain.com. The www subdomain leads to a 401 message: "You don't have permission to access the resource."

My DNS has a CNAME entry for www pointing to domain.com. When I asked the DNS provider what the problem might be they said "Please contact your hosting provider and provide us with the record needed to be set for www in the DNS zone. The changes should have worked already."

The reason I need this is that some old-school people visiting our website still type www. into the URL bar.

top 2 comments
sorted by: hot top controversial new old
[โ€“] [email protected] 2 points 5 days ago (1 children)

That 401 is a HTTP error, not a DNS error. The webserver or application have some rule for blocking the client.

[โ€“] [email protected] 1 points 5 days ago

That narrows it down, thanks. If this is just a shortcoming of Gitlab Pages I can move to another platform easily enough, but their docs imply it's supported: https://docs.gitlab.com/ee/user/project/pages/custom_domains_ssl_tls_certification/#redirect-wwwdomaincom-to-domaincom-with-cloudflare