Forum Discussion

techie1s's avatar
techie1s
Brass Contributor
Jun 05, 2018
Solved

Reusing a Deleted SharePoint Site Name

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?

  • Thiraviam5316's avatar
    Thiraviam5316
    Brass Contributor

    techie1s 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/ 

  • AlanCoulterOz's avatar
    AlanCoulterOz
    Copper Contributor

    techie1s 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>

  • Tim Miller's avatar
    Tim Miller
    Copper Contributor

    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? 

    • jfranz's avatar
      jfranz
      Brass Contributor

      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. 

      • Tim Miller's avatar
        Tim Miller
        Copper Contributor

        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

  • jfranz's avatar
    jfranz
    Brass Contributor

    techie1s 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. 

    • Setayesh2's avatar
      Setayesh2
      Copper Contributor

      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?

       

      • koates's avatar
        koates
        Copper Contributor

        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).?

    • Peter_Morris's avatar
      Peter_Morris
      Copper Contributor

      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

       

      • Manidurai Mohanamariappan's avatar
        Manidurai Mohanamariappan
        Iron Contributor

        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.

    • techie1s's avatar
      techie1s
      Brass Contributor

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

    • techie1s's avatar
      techie1s
      Brass Contributor

      Thank you so much! This was invaluable feedback!

Resources