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

@Dayna Lovelady After manually deleting the site collection, the site collection will be at Tenant Recycle bin but you willn't be able to delete manually. You can use below commandlet to delete it.

 

Clear-PnPTenantRecycleBinItem -url  <https://spjourney.sharepoint.com/sites/companynews>

 

Once you delete from RecycleBin then the URL will be available.

 

 

 

best response confirmed by Dayna Lovelady (Brass Contributor)
Solution

Similarly, you can permanently remove the deleted site using  Remove-SPODeletedSite cmdlet.

Thank you so much! This was invaluable feedback!

Thank you for taking the time to reply! This worked perfectly!!!

@Manidurai Mohanamariappan 

Do you have to wait any length of time to be able to reuse the URL? I've removed a site using the Remove-SPODeletedSite command but it still wants to create a URL with a 2 on the end. 

It was a classic site, I removed it, waited 29 days for it to disappear. Saw it in the recycle bin on the NEW SharePoint Admin centre, deleted it from there, then ran the Remove-SPODeletedSite command. It is gone. I can't find it anywhere but when I try to create the site again (in a Modern stylie), it puts a 2 on the end.

Hence my question. To I have to wait a certain length of time.

Peter

I'm a SharePoint Admin only

 

@Peter_Morris 

I have checked my tenant is working fine, so i can able to create new site with old name with in 2 minutes. can you please check Get-SPODeletedSite it will returns all deleted site collections from the Recycle Bin.

@Manidurai Mohanamariappan 

So This morning it tried to give me an ITS2 site when I wanted an ITS site. As I was gathering information for you it allowed the ITS site but when I tried to save it, I got a "group" already exists. I suspect it's Office365.

See screenshots attached/below. 

@Peter_Morris In Office 365, if there is an exchange group (also called Office 365 Group) already existing with name ITS, then creation of any SharePoint site/Teams with same name appends '2' in the URL (like /ITS2/).

 

This is because, creating any Office 365 Group thru exchange (outlook) OR Teams will auto-create a SharePoint site in Office 365.

@ellan1537 

Thanks for this. I'd guessed it would be an O365 group causing it issues. Will look into how to remove that now. Got our O365 Admin to have a go but it hasn't worked so far. Might be more work involved.

Peter

@Dayna Lovelady you can now accomplish this by going into the new modern SharePoint admin center, go to the DELETED SITES section, find the site you want, check it then go to PERMANENTLY DELETE. The site will be gone. 

This appears to still be an issue. I deleted a site and am looking to recreate with a different template. the Get-SPODeletedSites commandlet comes back clear with no deleted sites found. the site does not show in the Get-SPOSites either.  The site was deleted and removed in PowerShell. 

 

Trying to recreate the site it allows the same site name but puts a 2 on the site name for the URL.  Is there a database that needs cleared for the URL to be reused? 

@Tim Miller Sounds like you are having the same issue I was except I used the Central Admin console. My understanding is if you delete a site it goes into the site administration recycle bin where it sits for 30 days. You can force it to delete which would free up the old URL to be reused but it sounds like it is still in your site collection recycle bin but you aren't seeing it. Wondering if it is still a problem or if it cleared after some time? If you go into the Central admin and go to deleted sites do you see anything there? My understanding is once it's cleared from that site admin recycle bin that's it, it should be clear. 

@jfranz I have used both powershell and admin console. 

 

In PowerShell running Get-SPOSite and Get-SPODeletedSite, both outputs do not have the site listed so there is nothing to Remove-SPODeletedSite on.  I have also tried the Clear-PnPTenantRecycleBin wich came up with nothing as well. 

 

In the Admin console the site does not show in the active or deleted sites lists. 

 

to the best i can see the site is deleted and gone but I still get the "2" on the URL when recreating the site.  is there a database that the URL is stored in and a PS command to remove it maybe? im at a loss

@Tim Miller 

 

I've got the same problem, has anyone found an answer?

 

Thanks

@Aragorn 

 

Just use PNP provisionning to recreate your site with the URL you want. See more info @ https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/modern-experience-customizations-p...

 

I just tried it and worked well.

@LogicElite I was having the same issue. Created the site with same URL using SPO PowerShell New-SPOSite and it worked.

I also suffered this pain and this is how you fix it...

Connect-SPOService -Url "https://YOURDOMAINNAME-admin.sharepoint.com/_layouts/15/sharepoint.aspx" -credential YOURUSERNAME@YOURDOMAIN

Get-SPODeletedsite (this will return any old deleted URLs)

Remove-SPODeletedSite -Identity "COPY YOUR URL HERE"

You may need to be a Global Admin

 

 

 

 

@Tim Miller , I was having the same issue. It turned out it was a lingering Redirect that was holding onto the URL I wanted. This was most likely caused by me renaming the site before the deletion in an attempt to free the original name.
I discovered this by going to the desired site in the browser and noticing that it Redirected me to the now deleted site.
The
Remove-SPOSite -Identity https://contoso.sharepoint.com/sites/DesiredSiteName
command can be used to remove the Redirect. Note that I don't believe that site will appear in the list of Get-SPOSite. 
Get-SPOSite -Template REDIRECTSITE#0
will probably show you the redirect, unfortunately I only tried this after I'd already deleted it.
https://docs.microsoft.com/en-us/sharepoint/manage-site-redirects

The command
Remove-AzureADMSDeletedDirectoryObject - to purge a Deleted Group
may also be useful to others who find this thread as it's good to delete the sharepoint and the group before re-creating

@Manidurai Mohanamariappan 

 

I had the same problem. Created a team site but wanted to free up the name and create a communication site. I first changed the name to 'site2' but couldn't use the name so deleted the site through the suggestion in this topic. but still cannot use the name for the new site.

 

Anyone can advise?

 

1 best response

Accepted Solutions
best response confirmed by Dayna Lovelady (Brass Contributor)
Solution

Similarly, you can permanently remove the deleted site using  Remove-SPODeletedSite cmdlet.

View solution in original post