Manage site redirects
As part of changing a site address, moving a site to a different geo location, or swapping a site, we automatically create redirects to ensure that links pointing to the prior URL continue to work. These redirects are sites that use a special site template at the prior site URL.
For example, if you changed a site address from https://contoso.sharepoint.com/sites/OldSiteName to https://contoso.sharepoint.com/sites/NewSiteName or moved a site from https://contoso.sharepoint.com/sites/SiteName to https://contosoEUR.sharepoint.com/sites/SiteName, we'll place a redirect (Template type REDIRECTSITE#0) at the old URL, which contains special headers and logic to redirect your browser requests to the new site.
In some cases, you might want to free up the old URL to use it for a new site. To do this, you need to delete the redirect.
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 will not be routed to the new URL.
To remove a redirect
If you installed a previous version of the SharePoint Online Management Shell, go to Add or remove programs and uninstall “SharePoint Online Management Shell.”
On the Download Center page, select your language and then click the Download button. You’ll be asked to choose between downloading a x64 and x86 .msi file. Download the x64 file if you’re running the 64-bit version of Windows or the x86 file if you’re running the 32-bit version. If you don’t know, see https://support.microsoft.com/help/13443/windows-which-operating-system. After the file downloads, run it and follow the steps in the Setup Wizard.
Connect to SharePoint Online as a global admin or SharePoint admin in Office 365. To learn how, see Getting started with SharePoint Online Management Shell.
Run the following command:
Remove-SPOSite -Identity https://contoso.sharepoint.com/sites/OldSiteName
When prompted, confirm that you want to delete the redirect.
To confirm that the redirect has been deleted, browse to the URL. It should return a 404 error. You can also run
Get-SPOSite -Identity https://contoso.sharepoint.com/sites/OldSiteName. It will return that we cannot get the site.
You might need to clear the history in your browser before browsing to the URL.
To get a list of all redirect sites
Run the following command.
Get-SPOSite -Template REDIRECTSITE#0