Skip to content
All articlesSharePoint

SharePoint Error 404 File/Page Not Found: Causes and Fixes

Why SharePoint shows Error 404: File/Page not found and how to fix it: a deleted home page, a deleted site, a changed site address, or a moved or deleted file.

1 Dec 20269 min read
SharePoint Error 404 File/Page Not Found: Causes and Fixes

Why SharePoint shows Error 404

Error 404 in SharePoint means nothing exists at that address any more: Microsoft gives the cause as a site, file or group that "was renamed, moved, or deleted." When a whole site returns 404, check three things in order: whether the site's home page was deleted (restore it from the recycle bin, or make another page the home page), whether the site itself was deleted (restore it from Deleted sites in the SharePoint admin center), and whether the site's address was changed and the redirect at the old address was later removed. When a single file returns 404, it was moved, renamed or deleted; look in the recycle bin.

Microsoft's troubleshooting article "Error 404 File/Page not found in OneDrive or SharePoint" describes the symptom: "When you try to access a site, file, or group in Microsoft SharePoint or OneDrive, you receive the following error message:" Error 404: File/Page not found. The article is written for SharePoint Online (SharePoint in Microsoft 365) administrators. For everyone else, Microsoft's advice is: "If you can't find the content that you're looking for, check with your SharePoint administrator."

What returns 404Likely causeFix
The site's address, while the site still existsThe home page (by default Home.aspx) was deletedRestore it from the site recycle bin, or make another page the home page
The site, and it is missing from Active sitesThe site was deletedRestore it from Deleted sites in the SharePoint admin center
An old bookmark or link to a siteThe site address changed and the redirect at the old address was removedFind the new address; list redirects with Get-SPOSite -Template REDIRECTSITE
A link inside a web part or news post after a renameEmbedded URLs in web parts are not updatedEdit the web part to use the new URL
A link to one fileThe file was moved, renamed or deletedCheck the recycle bin and the second-stage recycle bin
A link to someone's OneDriveThe OneDrive was deletedAn admin restores the deleted OneDrive

Restore a deleted home page

If the site's home page was deleted, the site address returns 404 even though the site still exists. Microsoft's steps:

  1. Browse to the site recycle bin by pasting this URL into the browser: https://<tenantname>.sharepoint.com/sites/<sitename>/_layouts/15/RecycleBin.aspx?view=5
  2. Replace tenantname with your organization's name and sitename with the name of the site that is missing a home page.
  3. Find the page. Microsoft: "The default name of the page is Home.aspx. However, it might be something different if you've replaced the default home page."
  4. Highlight the file, and select Restore.

If the page is not there, Microsoft says "it may have moved to the Second-stage recycle bin":

  1. At the bottom of the recycle bin page, look for Can't find what you're looking for? Check the Second-stage recycle bin, and select Second-stage recycle bin.
  2. Highlight the file, and select Restore.

Microsoft: "If you did not find the page in the second stage recycle bin, this indicates that it was permanently deleted." In that case, make another page the home page. SharePoint recycle bin covers the two stages and who can see the second one.

Make another page the home page

Microsoft Support's article "Use a different page for your SharePoint site home page" applies to SharePoint in Microsoft 365, SharePoint Server 2019 and SharePoint Server Subscription Edition. Microsoft: "You must be the site owner to set a different page as a homepage."

  1. Select Settings (the gear), and then Site contents.
  2. On the Site contents page, select Site pages.
  3. Find the page you want as the home page, and select the circle to the left of the page title.
  4. Select the ... next to the page title, and then select Make homepage.

The page has to be in the Site Pages library. If you don't see the options, the library may be in the classic experience; Microsoft's article says to select Exit classic experience at the bottom left. If you don't have a page to use, how to create and edit a SharePoint page covers creating and publishing one.

Restore a deleted site

Microsoft: "The site might have been deleted. If so, restore the deleted site from the new SharePoint admin center."

  1. In the SharePoint admin center, go to the Deleted sites page.
  2. Select the site to restore.
  3. Select Restore.

Microsoft: "If the deleted site was the root (top-level) SharePoint site, you'll have to first restore the site and then replace it by using the steps in Replace your root site." How to restore a deleted SharePoint site covers the 93 days deleted sites are kept, PowerShell, sites connected to a Microsoft 365 group, subsites and the root site.

When the site address was changed

Microsoft: "If the user is trying to access the site from a saved site URL or a link to a specific site URL, it's possible that the site URL was changed or that the site was moved or deleted."

When an administrator changes a site address, SharePoint keeps the old one working. Microsoft: "When you change a site address, we create a redirect at the previous address." Users who saved the site as a favorite or select a link to it are sent to the new URL, and sharing links redirect too. The redirect is a site with the template REDIRECTSITE#0 at the old URL, which Microsoft says "contains special headers and logic to redirect your browser requests to the new site."

The 404 appears when that redirect is gone. Microsoft: "After you delete a redirect, any request to that URL won't get redirected. This means that any bookmarks, links, or Shared With Me references aren't routed to the new URL." Administrators delete redirects to free up an old address for a new site, or as part of reversing a rename.

To find where a site went, list the redirects with SharePoint Online PowerShell:

  1. Connect to SharePoint Online PowerShell as a SharePoint Administrator; Connect-SPOService covers the sign-in.
  2. Run Get-SPOSite -Template REDIRECTSITE to list all redirect sites.
  3. Match the old address to its new one, and update the bookmark or link.

Some links are not redirected even when the redirect is in place. Microsoft: "Any embedded URLs in any SharePoint web parts (News, List, etc.) won't be updated and may break. This includes page thumbnail images in news posts existing on the site." A List View web part scoped to a folder "might display an error after the site URL is changed"; edit the web part and reset the folder path, or remove and add it again. Rename a SharePoint site lists everything else an address change affects.

A link points to one location. When the file or page is moved, renamed or deleted, the link has nothing to open and returns 404.

  • Deleted: look in the site recycle bin, then the second-stage recycle bin. Microsoft's Support article "Restore items in the recycle bin that were deleted from SharePoint or Teams" has the steps, and SharePoint recycle bin explains who can restore what.
  • Moved or renamed: the file still exists at its new location. Search the site for it, and share a new link from there.

The same error appears for OneDrive. Microsoft's article points administrators to "Restore a deleted OneDrive" for a OneDrive that was deleted.

Frequently asked questions

What does Error 404 File/Page not found mean in SharePoint?

The site, file or group at that address was renamed, moved or deleted, so nothing exists at that URL. Microsoft's advice to users is to check with their SharePoint administrator.

Why does my SharePoint site show 404 when the site still exists?

The site's home page may have been deleted. Restore Home.aspx from the site recycle bin, or from the second-stage recycle bin, or have a site owner make another page the home page.

How do I restore a deleted SharePoint home page?

Open the site's recycle bin, find Home.aspx (or the page you used as the home page), and select Restore. If it is not there, check the Second-stage recycle bin. The steps above give the direct address of the recycle bin.

How do I change the home page of a SharePoint site?

As a site owner, go to Settings, Site contents, Site pages. Select the page, select the ... next to its title, and select Make homepage.

SharePoint creates a redirect at the old address when a site address changes. If that redirect was later deleted, bookmarks, links and Shared With Me references no longer reach the new URL. Get-SPOSite -Template REDIRECTSITE lists the redirect sites that remain.

Can a deleted SharePoint site cause a 404?

Yes. Microsoft lists a deleted site as one of the causes. A SharePoint administrator can restore it from the Deleted sites page in the SharePoint admin center.

Microsoft states that embedded URLs in SharePoint web parts, including page thumbnail images in news posts, won't be updated when the site address changes. Edit the web parts to use the new URL.

About the author
Mark Smith - Co-Founder, SmiKar Software

Mark Smith co-founded SmiKar Software in 2015 and has spent the past decade helping organisations solve Microsoft 365 data management challenges. He works with the SmiKar team to build solutions for SharePoint archiving, storage optimisation, governance and compliance, supporting customers from growing businesses through to Fortune 500 enterprises.

More about SmiKar

Ready when you are

Cut your Microsoft 365 storage bill - keep your data in your tenant.