I am running SharePoint Server 2016 with two servers: an application and database server. I have created a new web application and site collection (URL is http://mysite.local/sites/site1) in SharePoint Central Administration under Manage web applications->New Web Application. Visiting this URL in the browser prompts for a username and password. However, even after entering a valid domain account, the login prompt continues to prompt for credentials, after which a 401 unauthorized message is shown.

Below are some of the web app settings I added, related to the authentication:

  • Host header: mysite.local
  • Port: 80
  • Allow Anonymous: No
  • Enable Windows Authentication: Yes
  • Integrated Windows authentication (NTLM): Yes
  • Basic authentication: Yes
  • Enable Forms Based Authentication: No
  • URL: http://mysite.local:80

I have added a mapping of the SharePoint server's IP address to mysite.local in the SharePoint server's hosts file for testing purposes. I have also added my domain account as an admin of the site collection.

I have also found the below error messages related to authentication in IIS manager under Sites-> My SharePoint Site -> Authentication:

"Challenge-based and login redirect-based authentication cannot be used simultaneously"

"Your applications might fail due to your current authentication settings"

IIS authentication settings for SharePoint site

I am not sure why I am experiencing the above errors since I created the web app in SharePoint and did not make any changes in IIS manager.


SharePoint error logs:

I have checked the trace logs under the following path:

%CommonProgramFiles%\Microsoft Shared\Web Server Extensions\16\LOGS\

and found some more info regarding the 401 unauthorized message:

Claims Windows Sign-In: Sending 401 for request ' http://mysite.local/sites/site1' because the user is not authenticated and resource requires authentication.

Alternate Access Mappings:

An entry has automatically been added for AAM:

Regarding if accessing SharePoint site worked before adding host header:

I did not try to add web app in SharePoint on port 80 without a host header, since I have another site in IIS running on port 80. However, I did try adding a web app in SharePoint on a different port (port 81) without a host header e.g. and authenticating to this site worked successfully.

3 Answers 3


You should read up on msdn on how to setup SharePoint server. Could be several issues related to 401 errors.

I would advise that you read:


I would look at your accounts that you used to setup SharePoint so in the above link on the first table look at the second row.

I would also look at the error log in your application server it would be more specific why its throwing a 401 error that would help solve your issue if you dont mind posting it as an update to your question. If its to do with your service account: Make sure that the service account for the application pool has the correct permissions (find out more in the link above second row).

Also make sure that you have your AMM setup.


before you changed the headder (when you created the web application and the site) did you test to see if the site worked? if it did then you need to sort out your alternate access mapping. If it didnt then its a service account issue.

  • I have edited my question and added more details as per what you have asked in your answer.
    – synthesis
    Jan 10, 2018 at 8:17
  • ahh ok just need to know have you registered the url within DNS or Hosts file? also are you accessing the site from the server as you cant do that because of conflicting authentication? if from the server it goes into a loop. You should be able to access it out of the server like on your local machine. You could change a setting in the registry which would make it work on the server directly.
    – Ali Jafer
    Jan 10, 2018 at 12:57
  • I have registered the URL in the hosts file. Turned out, as you said, it was not working because I was accessing the URL from the server. It works from a local machine. Thanks!
    – synthesis
    Jan 10, 2018 at 13:56

After trying to access the URL from a local machine, it worked. It was previously showing 401 Unauthorized since the login was attempted on the SharePoint server.


"DisableLoopbackCheck" is normally the problem if it works on a remote machine, but not locally on the SharePoint Server.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.