Tenant Rename Leaves Old SharePoint URLs: Fix
🔍 WiseChecker

Tenant Rename Leaves Old SharePoint URLs: Fix

After renaming your Microsoft 365 tenant domain, you expected all SharePoint site URLs to update automatically. Instead, existing SharePoint sites still show the old domain name in their URLs. This happens because the tenant rename process updates the default domain for new sites but does not retroactively change URLs for sites created before the rename. This article explains why old SharePoint URLs persist and provides the exact steps to update them using PowerShell.

Key Takeaways: Fixing Stale SharePoint Site URLs After a Tenant Rename

  • SharePoint Online Management Shell: Use the Set-SPOSite cmdlet with the -Url parameter to update each site’s URL to the new tenant domain.
  • Get-SPOSite -IncludePersonalSite:$true: Retrieves all sites including OneDrive personal sites that need URL updates.
  • Set-SPOTenant -SiteCreationDefaultNewSiteTemplate: Ensures new sites created in the future use the new domain template.

ADVERTISEMENT

Why Tenant Rename Does Not Change Existing SharePoint URLs

When you rename your Microsoft 365 tenant domain in the Microsoft 365 admin center, the change affects the default domain used for new user accounts and new SharePoint site collections. However, SharePoint sites created before the rename retain the original domain in their root URL. This is by design: Microsoft does not automatically redirect or rename existing site URLs to prevent broken links and data loss.

The old URL remains functional — users can still access the site using the original domain. But this creates confusion, especially if your organization has a strict naming policy for domains. Additionally, any new sites you create after the rename will use the new domain, leading to a mix of old and new URLs across your tenant.

To fully align all SharePoint site URLs with the new tenant domain, you must manually update each site collection using PowerShell. The process is safe if you follow the correct order: update the site URL, then verify that all associated services (like search indexing and sharing links) refresh correctly.

Steps to Update Old SharePoint Site URLs to the New Tenant Domain

Before you begin, confirm that your tenant rename is fully complete and that you can sign in to the SharePoint admin center using the new domain. You need the SharePoint Online Management Shell and global admin or SharePoint admin permissions.

  1. Install and connect to SharePoint Online Management Shell
    Open Windows PowerShell as an administrator. Run Install-Module -Name Microsoft.Online.SharePoint.PowerShell if the module is not installed. Then run Connect-SPOService -Url https://[newtenant]-admin.sharepoint.com and sign in with your global admin credentials.
  2. Get a list of all site collections
    Run Get-SPOSite -IncludePersonalSite:$true -Limit All | Select-Object Url to see every site URL in your tenant. Identify which URLs still use the old domain. For example, https://oldtenant.sharepoint.com/sites/sales should become https://newtenant.sharepoint.com/sites/sales.
  3. Update a single site URL
    Use the Set-SPOSite cmdlet to change the URL. Run: Set-SPOSite -Identity https://oldtenant.sharepoint.com/sites/sales -Url https://newtenant.sharepoint.com/sites/sales. The site becomes read-only during the URL change, which typically takes a few minutes.
  4. Verify the new URL works
    Open a web browser and navigate to the new URL. Confirm that all pages, lists, and libraries load correctly. Check that sharing links and permission groups still function. If the site uses a custom domain, update the custom domain mapping in the SharePoint admin center.
  5. Repeat for all affected sites
    For a large tenant, create a PowerShell script that loops through all sites with the old domain and runs Set-SPOSite for each. Use a filter like Get-SPOSite -IncludePersonalSite:$true | Where-Object {$_.Url -like "oldtenant"} to target only stale URLs.
  6. Update the default site template for new sites
    Run Set-SPOTenant -SiteCreationDefaultNewSiteTemplate "STS#3" (or your preferred template) to ensure any new site created after the rename uses the new domain by default.

ADVERTISEMENT

If SharePoint Still Has Issues After the URL Update

Search results still show old URLs

SharePoint search crawls site content regularly. After renaming a site URL, search results may temporarily display the old URL. To force a reindex, go to the site settings, select Search and offline availability, and click Reindex site. Full reindexing can take up to 24 hours.

OneDrive personal sites not updating

OneDrive for Business sites are also affected by a tenant rename. Use Get-SPOSite -IncludePersonalSite:$true -Filter "Url -like 'oldtenant'" to find personal sites. Update each OneDrive URL using the same Set-SPOSite cmdlet. Note that OneDrive sync clients may need to be reconnected after the URL change.

Sharing links break after URL change

Existing sharing links (Anyone, People in your organization, or Specific people) that contain the old URL will stop working. Users must create new sharing links for the updated site URL. To minimize disruption, communicate the URL change to all site members before running the update and ask them to replace any saved links.

Before and After: Tenant Domain vs SharePoint Site URLs

Item Before Tenant Rename After Tenant Rename (Without Fix) After Fix
Tenant default domain oldtenant.onmicrosoft.com newtenant.onmicrosoft.com newtenant.onmicrosoft.com
New SharePoint site URL https://oldtenant.sharepoint.com/sites/new https://newtenant.sharepoint.com/sites/new https://newtenant.sharepoint.com/sites/new
Existing SharePoint site URL https://oldtenant.sharepoint.com/sites/sales https://oldtenant.sharepoint.com/sites/sales https://newtenant.sharepoint.com/sites/sales
OneDrive personal site URL https://oldtenant-my.sharepoint.com/personal/user https://oldtenant-my.sharepoint.com/personal/user https://newtenant-my.sharepoint.com/personal/user

You can now update all stale SharePoint site URLs to match the new tenant domain using the Set-SPOSite cmdlet. After completing the updates, run a full search reindex on each changed site and notify users to replace old sharing links. For ongoing management, consider using a PowerShell script to regularly audit site URLs and catch any sites that may have been missed.

ADVERTISEMENT