Remove a Deleted SharePoint Site That Shows a 404 Error
Question details
Remove an obsolete SharePoint site or link that remains visible after the site was deleted.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- A deleted site still appears on the SharePoint home page.
- Observed behavior
- Selecting the site opens a 404 Not Found error.
Copy the URL of the site that returns the 404 error and check whether the visible item is a site card or a navigation link. You need SharePoint administrator permissions to inspect or remove sites with the SharePoint Online Management Shell.
Check and remove the site with SharePoint Online Management Shell
Use this method if the site may still exist in SharePoint Online or in the deleted sites recycle bin.
A 404 error alone does not prove that a site has been deleted. Confirm the site URL and its status before running a removal command.
Remove-SPOSite moves an existing site to the deleted sites recycle bin. Remove-SPODeletedSite permanently deletes a site from that bin and makes it unavailable for restoration.
Install and open the SharePoint Online Management Shell, then run Connect-SPOService -Url https://contoso-admin.sharepoint.com, replacing the URL with your SharePoint admin center URL.
Run Get-SPOSite -Identity https://contoso.sharepoint.com/sites/example to check for an existing site. Run Get-SPODeletedSite -Identity https://contoso.sharepoint.com/sites/example to check the deleted sites recycle bin. Replace the example URL with the affected site URL.
If Get-SPOSite finds the site and you intend to delete it, run Remove-SPOSite -Identity https://contoso.sharepoint.com/sites/example and confirm the prompt.
If Get-SPODeletedSite finds the site and permanent deletion is appropriate, run Remove-SPODeletedSite -Identity https://contoso.sharepoint.com/sites/example and confirm the prompt.
Return to the SharePoint home page and refresh it. If the site no longer exists but an obsolete link remains, check the relevant navigation or followed-site list.

Remove an obsolete SharePoint navigation link
Use this method when the site is gone but a manually managed link still points to it.
Work with Office documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing Office files. Its format compatibility makes it easy to move existing documents into your workflow. It does not remove SharePoint sites or fix SharePoint 404 errors.

Frequently Asked Questions
Does a SharePoint 404 error mean the site has been deleted?
Not necessarily. Check the exact URL and have a SharePoint administrator use Get-SPOSite and Get-SPODeletedSite to inspect the site status.
What is the difference between Remove-SPOSite and Remove-SPODeletedSite?
Remove-SPOSite deletes an existing site and moves it to the deleted sites recycle bin. Remove-SPODeletedSite permanently removes a site from that bin.
Can I restore a site after using Remove-SPODeletedSite?
No. Remove-SPODeletedSite permanently deletes the site from the deleted sites recycle bin, so confirm that it is no longer needed before running the command.
How do I remove a broken SharePoint navigation link?
Select Edit next to the relevant navigation menu, remove the obsolete link, and save your changes. If you cannot edit the menu, contact the site owner or SharePoint administrator.
What if the deleted site still appears under Following?
On the SharePoint home page, look for an unfollow or star control on the site card. If you cannot remove it there, ask a SharePoint administrator to investigate the lingering entry.




