Delete old SharePoint URLs in SharePoint Online

Manage Site Redirects in SharePoint Online

๐…๐ซ๐ž๐ž ๐ฎ๐ฉ ๐ฒ๐จ๐ฎ๐ซ ๐จ๐ฅ๐ ๐’๐ก๐š๐ซ๐ž๐๐จ๐ข๐ง๐ญ ๐”๐‘๐‹๐ฌ ๐š๐ง๐ ๐ซ๐ž๐ฎ๐ฌ๐ž ๐ญ๐ก๐ž๐ฆ!

Old URLs from moved or renamed sites stick around as redirects. These ensure bookmarks and links still workโ€”but what if you want to reuse them for new sites? Hereโ€™s how:

  1. Check for the redirect: Old URLs use a special REDIRECTSITE template.
  2. Delete the redirect to free the old URL: You can remove single URLs using the SharePoint Online Management Shell:

Remove-SPOSite -Identity https://contoso.sharepoint.com/sites/OldSiteName

โšกBulk deletion tip: If you have multiple old URLs, use this script:

$OldUrls = @(
ย ย ย "<site url>",
ย ย ย "<site url>"
)
foreach ($url in $OldUrls) {
ย ย ย Write-Host "Deleting redirect site: $url"
ย ย ย Remove-SPOSite -Identity $url -Confirm:$true
}

 

๐Ÿ’ก You can also replace the list with a CSV import for larger batches.

โš ๏ธ Note: Ensure no retention policies block deletion, and clear your browser cache for instant results. After deletion, confirm by visiting the URL (should return 404) or using:

Get-SPOSite -Identity https://contoso.sharepoint.com/sites/OldSiteName

Reassign URLs to new sites without leaving old redirects behind.

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe to Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Powered by Amail.