Error 401 when using custom domain with www

Hi,

I am getting error “401 - you don’t have permission to access the resources” when using ‘www’ in the URL. Though the URL works fine when used without www.

Please see the below links
http://www.privateyogagoa.com/ (this link giving 401 error)
privateyogagoa.com (this link works fine)

What can I do?

Thank You

Hello, did you solve it? Please help, I am struggling same thing.

I have tried setting in my custom domain control panel these settings:

TXT _gitlab-pages-verification-code.www → gitlab-pages-verification-code=SOME_CODE

or do I need to add A record like:

CNAME www.DOMAIN(dot)RUUSERNAME.gitlab.io?

I had a similar problem.

I did everything the docs showed:

But(!) I also had to:

  • Add www.example.com as New Domain to Gitlab Pages
  • And verify it via a TXT record

Took me a while to figure this out. Hope it’s helpful to someone else as well.