SOLVED

Reusing a Deleted SharePoint Site Name

Brass Contributor

QUESTION: Can a new site be created with the same name of a deleted site?

 

SCENARIO: Today I deleted a SharePoint Team Site (O365) that I created yesterday. Now I want to create a SharePoint Communications Site with the same URL (name) as the SharePoint Team Site that I deleted. (For example: https://company365.sharepoint.com/sites/CompanyNews)

 

ISSUE: I tried creating it but it placed a "2" after the site name in the URL (For example: https://company365.sharepoint.com/sites/CompanyNews2). I will try deleting the site via Powershell since I only deleted the site by going to Site Information > Delete Site.  I just wonder if the name will then become available.

 

Any thoughts?

28 Replies

@Setayesh2 , I found that when I renamed a site it made the problem worse by adding redirects. Did you check to see if there are any lingering redirects (essentially aliases for the site name).?

@koates 

Not sure, Where should I check? I didn't make any alias for that. there was just a deleted office 365 group, I deleted that permanently after deleting the site. 

 

 

Remove-SPOSite -Identity https://contoso.sharepoint.com/sites/site1 helped me to fix it.

 

Thanks

@Setayesh2 After scrabbling around all day , i found that after running the PS command 'Connect-SPOService' and filling in the Admin site 'xxxx.admin.sharepoint.com' URL ( not the normal site ) then once authenticated running the command 'Remove-SPOSite -Identity https://xxxxxx.sharepoint.com/sites/siteyouwantremoved' worked for me so thank you for that

@Dayna Lovelady I found that even after removing the deleted site from the recycle bin, even after a few days I still could not create the site using the original URL (i.e. it appends a '2' on the end of the URL when you try to use the original URL). Even when using New-PnPSite, the URL returned had the 2 on the end.

To fix it however, I was then able to do a Connect-SPOService -Url <tenantadminurl>, then run the Start-SPOSiteRename command.

Syntax:  Start-SPOSiteRename -Identity <newsiteurl> -NewSiteUrl <originalsiteurl>

The right answer!

Actually I realize now that's not always the right answer...Msft has made such a hash job of site deletion that sometimes even if you "permanently delete" a site from SP admin deleted sites page, you still can't reuse its url. It just happened to me so in that scenario you still need powershell:

Connect-SPOService -Url https://xxx-admin.sharepoint.com
Remove-SPOSite -Identity https://xxx.sharepoint.com/sites/deletedsite

If you have admin permission, you can manipulate with the new Sharepoint Admin page to
1. restore the site you have deleted
2. update its url to something different than the desired, e.g. CompanyNews-deleted
then CompanyNews become available again

https://learn.microsoft.com/en-us/sharepoint/restore-deleted-site-collection

@Dayna Lovelady To reuse a deleted SharePoint URL for a new site, there are different considerations based on the time elapsed from the date of deletion. If the site is within the 93-day period from the date of deletion, you need to permanently delete it before creating a new site with the same URL. To permanently delete a SharePoint site, use the following cmdlet:

Remove-SPODeletedSite -Identity <SPOSiteURL>

However, if the site has exceeded the 93-day period from the date of deletion, you can simply create a new site using the existing URL without the need for permanent deletion. For further details on managing deleted sites, check: https://m365scripts.com/sharepoint-online/manage-deleted-sharepoint-sites-using-powershell/ 

@Thiraviam5316 @Dayna Lovelady @matt howell 

 

Here are the scripts for permanently deleting the SharePoint online sites from your tenant using SharePoint Online PowerShell, PnP PowerShell and CLI for Microsoft 365: Empty the tenant recycle bin 


Please consider giving a Like if my post helped you in any way.