How to fix 404 error in SharePoint in subsite After Restoring a Content Database

[Fixed]: How to Fix 404 Error in SharePoint in subsite After Restoring a Content Database?

One comment

Loading

In this “How to fix 404 error in SharePoint in subsite After Restoring a Content Database?” troubleshooting technique, we will learn about how to fix a SharePoint 404 error in a subsite after restoring a content database.

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

1. The site might have been deleted, request the 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

Before getting into the solution, let us understand what a 404 error is in SharePoint in general.

What is a 404 Error in SharePoint?

A 404 error in SharePoint is a standard HTTP status code that indicates the requested resource (such as a page, document, or site) could not be found on the server. This error is common in web environments, including SharePoint, and typically occurs when the URL is incorrect, the resource has been moved or deleted, or there are permission issues.

Common Causes of 404 Errors in SharePoint

  1. Incorrect URL:

    • The URL entered might be incorrect or mistyped, leading to a resource that does not exist.
  2. Moved or Deleted Content:

    • The resource (page, document, site) has been moved to a different location or deleted.
  3. Permission Issues:

    • The user does not have the necessary permissions to access the resource, resulting in a “not found” response instead of a “forbidden” response for security reasons.
  4. Broken Links:

    • Hyperlinks within pages, documents, or navigation menus pointing to non-existent resources.
  5. Site Collection or Subsite Issues:

    • The requested site collection or subsite does not exist or has been removed.
  6. Content Database Issues:

    • Problems with the content database where the resource is stored.
  7. Custom Errors or Redirections:

    • Customizations or misconfigurations in the web application or site that cause incorrect handling of URLs.

Troubleshooting 404 Errors in SharePoint

  1. Verify the URL:

    • Double-check the URL for any typos or errors.
    • Ensure that the URL structure is correct (e.g., includes the site collection and subsite paths if applicable).
  2. Check Permissions:

    • Verify that the user has the appropriate permissions to access the resource.
    • Test the URL with an account that has full permissions to rule out permission issues.
  3. Search for the Resource:

    • Use SharePoint search to locate the resource by its name or properties.
    • Check if the resource has been moved to a different location within the site or site collection.
  4. Review Site Structure:

    • Ensure that the site collection, subsite, or library where the resource is supposed to be exists and is accessible.
  5. Inspect Links and Navigation:

    • Check for broken links in pages, documents, or navigation menus that might be pointing to non-existent resources.
    • Use link validation tools to scan for broken links within the site.
  6. Review Content Database:

    • If you suspect database issues, check the content database for any problems or inconsistencies.
    • Ensure that the content database is properly attached and accessible by the SharePoint farm.
  7. Check Customizations:

    • Review any custom error pages or URL rewriting rules that might be incorrectly handling requests.
    • Disable customizations temporarily to see if the issue persists.
  8. Use Developer Tools:

    • Use browser developer tools to inspect the network request and response.
    • Look for additional error details in the response headers or body.

Preventing 404 Errors in SharePoint

  1. Regular Maintenance:

    • Regularly review and update links and navigation menus to ensure they point to existing resources.
    • Conduct periodic site audits to identify and correct broken links.
  2. User Training:

    • Train users on proper URL structures and how to update links when moving or renaming resources.
  3. Redirection Rules:

    • Implement URL redirection rules to handle moved or renamed resources gracefully.
    • Use SharePoint’s redirect settings to manage changes in site structure or content locations.
  4. Content Management Policies:

    • Establish content management policies to ensure resources are not inadvertently moved or deleted.
    • Use versioning and archiving to keep track of changes to important resources.
  5. Monitoring and Alerts:

    • Set up monitoring and alerts to detect and respond to 404 errors promptly.
    • Use third-party tools or custom scripts to monitor for broken links and other issues.

By understanding the causes and solutions for 404 errors in SharePoint, administrators and users can effectively troubleshoot and prevent these errors, ensuring a smoother and more reliable SharePoint experience.

None of the above solutions worked for me – How to fix 404 error in SharePoint

Let me give you some background about the issue. I have migrated the content DB using mounting from SharePoint 2013 to 2016. All site collections, along with their subsites, got opened in the browser without any issue, but some of the subsites did not get opened in the browser, throwing 404 files and not finding an error.

If we go to the site content structure page, those subsites are available. It looks strange to me! I’m not getting any clues. I kept on investigating this issue..tried to list out the site using the SPSite collection PowerShell command, but it got listed out; it made me more strange. Then I tried to connect one of the faulty subsites using ShareGate. There I saw an object reference, not a set error.

Then I changed the direction of my investigation…I have deleted the faulty subsite and tried to recreate it again with the same name manually, then got the error, You cannot create a site with this name <0x06>IT> as this is a reserved keyword by SharePoint. It made me ridiculous how this could be a reserved keyword. Then I went to check the “manage” path for this web application.

Yes, I found the solution. The 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 a subsite and access IT along with all subsites under this. This is how I have solved this… but nowhere have I gotten any links or clues about this. This is totally based on my personal experience. For you, the scenario might be different.

Example: Manage path in a web application: IT
I was trying to access the subsite like below:

server:1010/IT #here IT is subsite.

So if we have a managed path with the name IT, we cannot browse this subsite along with all subsites under IT.

Solution: How to fix 404 error in SharePoint in subsite After Restoring a Content Database?

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

Summary: How to fix 404 error in SharePoint in subsite After Restoring a Content Database?

Thus, in this troubleshooting technique, we have learned about how to fix a SharePoint 404 error in subsite after Restoring a content Database.

See Also: SharePoint Online Tutorial

You may also like the below SharePoint Online Tutorials:

 

 

About Post Author

1 comments on “[Fixed]: How to Fix 404 Error in SharePoint in subsite After Restoring a Content Database?”

Do you have a better solution or question on this topic? Please leave a comment