Hi, I have created my website with gitlab-pages ans a custom domain, effectivecoding.fr.
I have added the domain effectivecoding.fr in gitlab. The site works well with : effectivecoding.fr, secured with let’s encrypt.
Unfortunately, it does not work when I go to www.effectivecoding.fr : I have a 401 Error “- You don’t have permission to access the resource.”
I also tried with 2 separate domains in Gitlab : effectivecoding.fr and www.effectivecoding.fr, but the lets’s Encrypt certificate can not be validated for the second domain, and so https is not working.
Hi @Sylvain, did you manage to solve this issue? I have the same problem (also using OVH) and none of the solutions I found on the forum helps I added my root domain with DNS A record and TXT verification successfully (so https://mydomain.com works fine and is encrypted), but cannot do the same for www.mydomain.com. I tried:
adding www.mydomain.com as New Domain and and TXT verification passed, but I can’t validate Let’s Encrypt and when I enter www.mydomain.com I got error “DNS_PROBE_FINISHED_NXDOMAIN” (in all browsers and devices). Only if I add DNS A record it works, but it means I treat www the same as my root domain, is that correct?
Also I didn’t understand why the documentation suggest adding both TXT and CNAME for subdomain www.example.com - when I try to do this in my DNS zone I got error stating I can’t add both TXT and CNAME records for one subdomain (sorry if it’s obvious, but I’m a total rookie).
Even I have the same problem. I use mydomain.com is working fine for me. TXT verification with mydomain.com is passed with Gitlab. I added CNAME record for redirecting www.mydomain.com to mydomain.com, but still, I am getting the error " 401
You don’t have permission to access the resource." one of Gitlab permission errors. @AlexC , @Sylvain any leads on this?
I’m seeing this issue. CNAME entry for www subdomain yields the error message mentioned above from gitlab " You don’t have permission to access the resource."
Create a new TXT verification record in DNS when prompted. This is not the same verification code as for “mydomain.com”, even though the example in the documentation uses the same value for both.
Back in Gitlab, click the Retry Verification button (looks like a curly arrow).
If you are using Let’s Encrypt certificates, then https://www.mydomain.com should start working after a few minutes.