Forum Discussion
changing url for /teams to /sites
priya216 Star-D MaximillianC ChristianJBergstrom
Hey, i am trying to change my SharePoint-URLs in a migration project as well. I don't think that you can use the SharePoint Admin Center to change single /sites/ -sites to /teams/ -sites and vice versa but as always PowerShell is the answer.
Step-by-Step:
1. open PowerShell or ISE on your desktop.
2. install the module "Microsoft.Online.SharePoint.PowerShell"
3. connect to your SharePoint Admin-URL with PowerShell "https://[orgname]-admin.sharepoint.com/"
4. Login with a Tenant/Global- or SharePoint-Admin
5. get the URL of you current site you want to change "https://[orgname].sharepoint.com/sites/testSite"
6. change the url with the PowerShell-Command
7. Disconnect
PowerShell-Code:
# optional
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
# import module
Import-Module -Name Microsoft.Online.SharePoint.PowerShell
# connect to SPOService
Connect-SPOService -Url https://[orgname]-admin.sharepoint.com/
# Change URL
Start-SPOSiteRename -Identity https://[orgname].sharepoint.com/sites/testSite -NewSiteUrl https://[orgname].sharepoint.com/teams/testSite
# disconnect SPOService
Disconnect-SPOService
To change /teams to /sites just change the URLs.
To validate a change you can add -ValidateOnly to the Start-SPOSiteRenam Cmdlet.
# validate Cmdlet
Start-SPOSiteRename -Identity https://[orgname].sharepoint.com/sites/testSite -NewSiteUrl https://[orgname].sharepoint.com/teams/testSite -ValidateOnly
Hope i could help.
Reminder:
Communicate the Change with the users of the site and try to avoid changing URLs in business hours.
- When the change will happen
- What the new URL will be
- Users should close their files and not make edits during the address change
- Users should check the site recycle bin to make sure it contains no files they want to keep
- File permissions and sharing won't change
Best Regards
- anjalimishra1Dec 28, 2023Copper ContributorHi, I tried these steps for resolution, but these steps are not working for content site, i tried to chnage content site URL but unable to that, please provide any alternate solution for this.