How to Fix a SharePoint 404 Error in sub site After Restoring a Content Database?

No comments

If we google the above text we will get the multiple references of fixing this issue, for this the traditional way of fixings are:

1. The site might have been deleted, request to site administrator to check the recycle bin.
2. Do the IIS reset.
3. Try to access the other layout page like /_layouts/15/settings.aspx(might be default.aspx or home.aspx has some issue).
4. Clear the timer job cache….etc

None of the above solutions worked for me.

Let me give some background about the issue. I have migrated the content db using mounting from SharePoint 2013 to 2016. All site collections along with their sub sites got opened in the browser without any issue but some of the sub site did not get opened in the browser, throws 404 file not found error. If we go to site content structure page those sub sites are available. It looks strange to me! not getting any clue. I kept on investigating this issue..tried to list out the site using SPSite collection PowerShell command,  it got listed out, it made me more strange. Then I tried to connect one of the faulty sub site using ShareGate…there I saw object reference not set error. Then I have changed the direction of my investigation…I have deleted the faulty sub site and tried to recreate it again with the same name manually, then got the error, you cannot create a site with this name <IT> as this is a reserved keyword by SharePoint, it made me ridiculous how this could be reserved keyword? Then went to check the manage path for this web application. Yes, found the solution…managed path was the issue. There was a manage path with the name IT in that web application, so we cannot create any sub site with that name with the same hierarchy of managed path. If we delete that IT manage path we can create sub site and can access IT along with all sub sites under this. This is how I have solved this…but nowhere got any links or clues about this. This is totally based on my personal experience….for you the scenario may be the different.

Example: Manged path in web application: IT
I was trying to access the sub site like below:

http://server:1010/IT #here IT is sub site.

So if we have manage path with the name IT, we cannot browse this subsite along with the all sub site under IT


Check the managed path and remove the manage path which is causing issue. Here I have removed IT managed path, then it worked fine.

Click here to read blog disclaimer: