How to Fix SharePoint Error HTTP 404
Diagnostic Procedures
- 1 Understand SharePoint HTTP 404 (Not Found)
- 2 Step 1: Check SharePoint Recycle Bins
- 3 Step 2: Repair URL Path Syntax and Special Characters
- 4 Step 3: Restore Deleted Site Collections
- 5 Step 4: Verify IIS Bindings and AAM (On-Premises)
How to Fix SharePoint Error HTTP 404
An HTTP 404 (Not Found) error in SharePoint indicates that the server cannot locate the page, document library, or file you are trying to access. This can occur when users click shared links, sync folders locally, or try to load administrative settings.
This guide provides troubleshooting steps to recover deleted items, repair malformed URLs, and configure server mappings.
Understand SharePoint HTTP 404 (Not Found)
Common causes for a 404 error include:
- Deleted Content: The document, library, or entire site collection was deleted by another user.
- Path Renaming: The folder structure or filename was changed, breaking existing links.
- URL Encoding / Length Limits: The URL contains invalid characters or exceeds the 400-character path limit.
- Incorrect Bindings / AAM (On-Premises): The Web Application in IIS has lost its host header binding, or the Alternate Access Mappings (AAM) do not match the public URL.
Resolving SharePoint HTTP 404 Errors
Follow these procedures to locate and restore the missing resources:
Step 1: Check SharePoint Recycle Bins
If a file or folder was deleted, it is moved to the site Recycle Bin for up to 93 days.
- Navigate to the parent SharePoint site.
- Click Recycle bin in the left-hand navigation pane.
- If you find the missing file, select it and click Restore.
- If it is not there, scroll to the bottom of the page and click Second-stage recycle bin (requires Site Collection Admin privileges).
- If found, select the item and click Restore.
Step 2: Repair URL Path Syntax and Special Characters
SharePoint Online and SharePoint Server have specific rules for character limits and length.
- Inspect the URL for special characters (like
%20for spaces,#,%, or&). Remove special characters from filenames and paths. - Ensure the total URL length does not exceed 400 characters.
- If the path has been renamed, ask the site owner for the updated link.
- Use this cmd command to quickly map a local path to check length limits if using OneDrive/SharePoint Sync on Windows:
:: Check length of local synced folder paths (replace with actual path)
dir "C:\Users\%USERNAME%\SharePoint\" /S /B | findstr /R /C:"........................................................................................................................................................................................................"
Step 3: Restore Deleted Site Collections (Administrators Only)
If the 404 error occurs when accessing the root site collection URL, the site may have been deleted.
Using SharePoint Online Management Shell:
- Open PowerShell as Administrator.
- Run the following commands to check deleted sites and restore them:
# Connect to your admin tenant
Connect-SPOService -Url "https://yourcompany-admin.sharepoint.com"
# List deleted site collections
Get-SPODeletedSite | Select-Object Url, DeletionTime
# Restore the deleted site collection
Restore-SPODeletedSite -Identity "https://yourcompany.sharepoint.com/sites/deletedsite"
Step 4: Verify IIS Bindings and AAM (On-Premises Only)
For on-premises farms, if the site returns a 404 error, verify the Web Application configuration.
Verify IIS Bindings:
- Log in to the Web Front End (WFE) server.
- Open Command Prompt as Administrator and run the following command:
:: List all active IIS site bindings to verify IP and Host Headers
%windir%\system32\inetsrv\appcmd list site
- Ensure the SharePoint Web Application has bindings configured for the hostname in the URL.
Verify Alternate Access Mappings (AAM):
- Open SharePoint Central Administration.
- Under System Settings, click Configure alternate access mappings.
- Click the Web Application.
- Ensure the public URL you are using matches one of the internal URLs mapped to the correct Zone (Default, Intranet, Internet, etc.).
Summary Checklist
- Check both the first-stage and second-stage Recycle Bins for deleted content.
- Inspect the URL to ensure it is under 400 characters and contains no unsupported characters.
- For administrators: run
Get-SPODeletedSitein PowerShell to confirm if the site collection was deleted. - Restore deleted sites or files using SharePoint Online PowerShell.
- On-Premises: Validate host header bindings in IIS and check the Alternate Access Mappings config.