06-05-2018 04:14 PM
06-05-2018 04:14 PM
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.
06-05-2018 07:32 PM
@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.
06-06-2018 03:56 AMSolution
Similarly, you can permanently remove the deleted site using Remove-SPODeletedSite cmdlet.
05-02-2019 06:10 PM - edited 05-02-2019 06:11 PM
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.
I'm a SharePoint Admin only
05-07-2019 02:01 PM
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.
05-07-2019 02:22 PM
@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.
09-13-2019 10:09 AM
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?
09-16-2019 05:23 AM
@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.
09-17-2019 11:03 AM
@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
10-07-2019 02:37 PM - edited 10-08-2019 02:28 PM
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.
08-10-2020 01:59 AM
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
09-30-2020 02:05 AM
@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.
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.
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