Sharepoint 2013 – 404 Not Found while accessing site collection from outside

Error :

I have a Sharepoint 2013 running on a Windows Server 2012. Following issue appeared:

I made a new Site-Collection as wiki. Everything (links,…) works fine on the server but when I want to access the wiki from outside (not localhost) the server runs in a 404 Not found error.

http://localhost/sites/wiki/Pages/Home.aspx - works fine(localhost)

http://10.38.0.15/sites/wiki/Pages/Home.aspx - doesn't work.

I checked the IIS settings, all servers are up and running. The log file has no errors in it.

Resolution :

The most common cause for this is that you don’t have the IIS host header configured correctly. The 404 will appear because you are hitting a different IIS web site and not the one you intended to.

If you go into IIS Manager and click on “Sites” in the right hand pane there will be a column called bindings and a column called ID.

IIS will check in the order of ID for the first site that matches. Make sure the default site is stopped. If you see bindings that look like the following:

ID 1: Bindings: *:80

ID 2: Bindings: http://www.yoursite.com:80

http://www.othersite.com will match ID 1. Any other site that doesn’t specify a port or https: will be directed to ID 2.

You need to ensure that the site you are trying to access matches your bindings. The “www.yoursite.com” is added to the site via “New Web Application” in SharePoint.

There is a field called Host: in Central Administration. This should match what you are typing from inside and outside the server.

If you need the site to respond to multiple names, you need to extend the web application.

Assuming you used the default of claims authentication, here are the instructions for that:

I am not sure if this is still required in Server 2012, but disabling the loopback check might also help, although this usually results in a 401, and repeated attempts to log in. Here are the instructions for that.

Advertisements
Retrive account password powershell

Partial Index Reset of a single content source

Partial Index Reset of a single content source

This script will remove and re-add your content source’s start addresses.

SharePoint will more or less rebuild the index for these sources, when the next full crawl is started.

$sourceName = “Local SharePoint sites”

$SSA = Get-SPEnterpriseSearchServiceApplication

$source = Get-SPEnterpriseSearchCrawlContentSource -Identity $sourceName -SearchApplication $SSA

$startaddresses = $source.StartAddresses | ForEach-Object { $_.OriginalString }

$source.StartAddresses.Clear()

ForEach ($address in $startaddresses ){ $source.StartAddresses.Add($address) }

Retrive account password powershell

IIS Reset on all SP Servers using PowerShell

This script will list all SP Servers and restarts IIS on all of them.

add-PSSnapin microsoft.sharepoint.powershell
$spserver = get-spserver | ?{$_.role -eq “Application”}
foreach ($server in $spserver)
{
write-host “Performing IIS Reset on Server:”$server.name
iisreset $server.Name
}