Getting a 401 Authorization Required message on my 'www' subdomain. Help!

I’m new here, and I may be doing things wrong…but I set up a CNAME record on my domain in order for www.mydomain(.)com to load like mydomain(.)com would.

The CNAME record has the following settings:

Name: www
Value: @
TTL: Automatic
Status: Orange

But what I get when I load is this:

Any ideas on what I should do to get the www subdomain working? The domain with www is working just fine.

I really appreciate the help!

P.S. Excuse the ()s - I can only add 2 links as a new user.

I meant that the domain without the www is working just fine.

This is an issue with your origin server likely being misconfigured. 4xx errors are only served from the origin, Cloudflare will only send 5xx error codes.

1 Like

That appears to be an error from the origin server. It’s likely you haven’t mapped the www virtual directory correctly to

curl -Ik --resolve
HTTP/1.1 401 Unauthorized
Server: nginx/1.11.9
Date: Thu, 16 Aug 2018 01:22:08 GMT
Content-Type: text/html
Content-Length: 195
Connection: keep-alive

You could use a page rule to redirect to or edit your nginx server block config and add the www server.

1 Like

Got it. We use CodePen so I will see if I can figure out how to use a page rule in order to do a redirect. Thanks all!

@cs-cf The Page Rule worked beautifully. Thank you again!


This topic was automatically closed after 31 days. New replies are no longer allowed.