As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [401]

401 Unauthorized - Very similar to 403 forbidden but is used when authentication is required and has failed or not been provided.

Filter by
Sorted by
Tagged with
2 votes
0 answers

After implementing HTTPS, "require valid-user" in subdirectory no longer asks for password, just gives 401 Not Authorized

I'm not very knowledgeable about server scripting, however I've only just installed SSL certificate for the domain. The main website (hosted by GoDaddy) is now working fine on SSL/TLS and I've ...
tonyb's user avatar
  • 21
2 votes
1 answer

Which HTTP response status code is most appropriate for a restricted URL?

I have a page on my website that's targeted at logged-in users only. Logged-out visitors shouldn't see the content. Imagine the page URL is In cases when users aren't ...
henrywright's user avatar
2 votes
1 answer

Does 401 pages effect SEO?

We have a website where we have a round 30 pages that are only visible for authorized users. in Google WMT we see errors appearing about this that Google bot can't read this. Do we have to add them ...
Mivaweb's user avatar
  • 269
3 votes
1 answer

Website Prompting Username and Password for Authentication on Debian Apache WebServer

I am attempting to host my own website with an Apache web server on Debian, but have reached this problem. When I try to go to my site at it immediately asks for me to authenticate with a ...
Andrew's user avatar
  • 61
2 votes
1 answer

How to tell Apache to reply with 403 instead of 401?

We have some rules for a subtree of Locations, which involve Require-ing ldap-group and exprs. The user is duly challenged to supply login-credentials, which are verified. However, even when the ...
Mikhail T.'s user avatar
3 votes
1 answer

Is HTTP code 401 or 403 appropriate for when a logged in user is not allowed to view the data?

I am looking for a good way to return an error when an unauthenticated/unauthorised user is trying to get a restricted access content from my site. Currently I ask the user to login, check the ...
texnic's user avatar
  • 227
2 votes
1 answer

Force HTTPS using 301 Redirect on IIS7 gets 401.1 Error

I've got a site that is using an Execute URL in the 403.4 error page slot that calls a page named forcessl.aspx. Here's the contents of the file: strWork = Replace(strQUERY_STRING, "http", "...
Phil's user avatar
  • 31
2 votes
1 answer

Should I use a 404 or a 403 error for secure content

I have a set of content in my web app that should only be visible if you are logged in. They have not public equivalent, should never be crawled, or otherwise known outside of logged in users of ...
Tyson of the Northwest's user avatar
1 vote
0 answers

Different behaviour with windows authentication on IIS7 websites

I need to run a website with just windows authentication. Given the following situation: The location of the default website is: c:\inetpub\wwwroot The location of my code is: c:\Sites\WebApp My ...
amaters's user avatar
  • 111