Gitlab pages not accessible throwing 401 permission error

:hugs: Please help fill in this template with all the details to help others help you more efficiently. Use formatting blocks for code, config, logs and ensure to remove sensitive data.

Problem to solve

401 You don’t have permission to access the resource.
Describe your question in as much detail as possible:
Hi, I am using gitlab to host my static site built on hugo. I have done the deployment and also made pages accessible to public under general settings. I am using custom domain from namecheap and the domain is verified. I have gone through the same issue in this forum but the solution has not worked for me. I have done dns settings based on the instructions from both gitlab as well as from namecheap but it is still not accessible. Any insight would be helpful

  • What are you seeing, and how does that differ from what you expect to see?
  • Consider including screenshots, error messages, and/or other helpful visuals

Steps to reproduce

Which troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?


Provide screenshots from the GitLab UI showing relevant configuration, if applicable.
On self-managed instances, add the relevant configuration settings or changes.

Custom domain name:-


Pages setting

Pages Domain

my namecheap settings

Here is my result		1799 IN	A		1800 IN	NS		1800 IN	NS		3601 IN	SOA (
				1709189744 ; serial
				43200      ; refresh (12 hours)
				3600       ; retry (1 hour)
				604800     ; expire (1 week)
				3601       ; minimum (1 hour 1 second)
				)		1800 IN	MX 10		1800 IN	MX 15		1800 IN	MX 20		1800 IN	MX 10		1800 IN	MX 10		1800 IN	TXT "v=spf1 ~all"		3600 IN	DNSKEY 256 3 13 (
				) ; ZSK; alg = ECDSAP256SHA256; key id = 49993		3600 IN	DNSKEY 257 3 13 (
				) ; KSK; alg = ECDSAP256SHA256; key id = 4353


Please select whether options apply, and add the version information.


Helpful resources

  1. Before opening a new topic, make sure to search for keywords in the forum search
  2. Check the GitLab project for existing issues. If you encounter a bug, please create a bug report issue.
  3. Troubleshooting docs: Self-managed GitLab instances.

Thanks for taking the time to be thorough in your request, it really helps! :blush: