How to Fix OneDrive Sync After Renaming a SharePoint Site
🔍 WiseChecker

How to Fix OneDrive Sync After Renaming a SharePoint Site

When you rename a SharePoint site, the site’s underlying URL changes. This breaks the sync relationship between OneDrive and the local files because OneDrive still points to the old URL. Sync stops, shows errors like “Sync is pending,” or displays a red “x” on files. This article explains why renaming a site breaks sync and provides the exact steps to reconnect OneDrive to the new URL without losing your local files.

Key Takeaways: Reconnecting OneDrive After a SharePoint Site Rename

  • OneDrive settings > Account > Stop sync: Use this to remove the old broken sync link before re-adding the renamed site.
  • OneDrive > Sync button on the renamed SharePoint site: Re-establish sync by clicking Sync on the new site URL in your browser.
  • Local files remain intact: Stopping sync does not delete files from your computer unless you choose “Delete files from this PC” during the process.

ADVERTISEMENT

Why Renaming a SharePoint Site Breaks OneDrive Sync

When you rename a SharePoint team site or communication site, the site’s URL changes from https://yourtenant.sharepoint.com/sites/oldsite to https://yourtenant.sharepoint.com/sites/newsite. OneDrive for Business stores the site URL as part of its sync metadata. After the rename, OneDrive continues trying to sync against the old URL, which no longer exists. The sync engine cannot authenticate or locate the files, so it shows errors like “Sync is pending,” “We can’t sync this library,” or a gray “x” icon on the OneDrive system tray.

The local files on your computer remain on disk, but they are no longer connected to the cloud. OneDrive does not automatically detect the URL change. You must manually stop the old sync relationship and then set up a new sync connection to the renamed site.

Steps to Restore OneDrive Sync After a SharePoint Site Rename

Follow these steps in order. Do not skip the stop sync step, as trying to sync both the old and new URLs will cause duplicate folders and file conflicts.

  1. Stop the existing sync relationship in OneDrive
    Right-click the OneDrive cloud icon in the system tray (near the clock) and select Help & Settings > Settings. Go to the Account tab. Under “Sync relationships,” find the entry for the old SharePoint site URL. Click Stop sync next to that entry. In the confirmation dialog, ensure Delete files from this PC is unchecked so your local copies remain. Click Stop sync to remove the link.
  2. Verify the renamed SharePoint site URL
    Open a web browser and navigate to your Microsoft 365 SharePoint home page. Find the renamed site in the list of followed sites or search for its name. Click the site to open it. The browser address bar shows the new URL. Copy the full URL from the address bar.
  3. Navigate to the document library you want to sync
    Inside the renamed site, go to the document library that you previously synced. This is usually called “Documents” but could be a custom name. Click the library name in the left navigation or on the site home page.
  4. Click the Sync button in the document library
    In the toolbar at the top of the library, click the Sync button. Your browser will prompt you to open the OneDrive application. Click Open or Allow.
  5. Choose the sync folder location
    OneDrive will ask where to save the files. The default location is C:\Users\YourName\SharePointSiteName. You can change this, but it is better to keep the default to avoid confusion. Click Next.
  6. Confirm sync starts successfully
    OneDrive will begin syncing the library. The system tray icon shows a spinning blue circle during initial sync. Open File Explorer and look for the new folder with the site name. Your files should appear. If you had local changes in the old folder, copy them into the new folder now.

ADVERTISEMENT

If OneDrive Sync Still Has Issues After the Main Fix

“We can’t sync this library” error appears

This error usually means the old sync relationship was not fully removed. Open OneDrive settings > Account and check if the old site URL still appears under “Sync relationships.” If it does, click Stop sync again. Then restart OneDrive by right-clicking the system tray icon and selecting Help & Settings > Quit OneDrive. Launch OneDrive again from the Start menu and repeat the steps to sync the renamed site.

Files are missing from the local folder after stopping sync

If you accidentally checked Delete files from this PC when stopping sync, the local copies are moved to the Recycle Bin. Open the Recycle Bin on your desktop, locate the folder with the old site name, right-click it, and select Restore. Then copy those files into the new synced folder.

OneDrive shows “Sync is pending” for hours

After setting up sync to the renamed site, OneDrive may show a pending status while it processes the library. This is normal for libraries with many files. Let OneDrive run for a few hours. If it does not progress, pause and resume sync: right-click the OneDrive icon, select Pause syncing > 2 hours, then after two hours, right-click again and select Resume syncing.

The old folder still appears in File Explorer

Stopping sync removes the sync relationship but does not delete the folder from your computer. You can safely delete the old folder after confirming all files are in the new synced folder. Right-click the old folder and select Delete. Empty the Recycle Bin afterward.

OneDrive Sync Behavior: Old Site vs Renamed Site

Item Old Site (Before Rename) Renamed Site (After Rename)
URL /sites/oldsite /sites/newsite
Sync status after rename Broken – shows error or pending Not set up – must be re-synced
Local folder name Old site name New site name
Local files Remain on disk Downloaded fresh during initial sync
Cloud files Still exist at new URL Accessible via new URL

This table shows that renaming a site does not delete cloud files. Only the sync connection breaks. You must re-establish sync to the new URL to keep local and cloud copies in sync.

You can now reconnect OneDrive to a renamed SharePoint site by stopping the old sync and clicking Sync on the new document library. After the steps above, your files will sync to the new folder. For future site renames, remember that OneDrive does not auto-detect URL changes. Always stop sync before renaming a site if possible. As an advanced tip, use the SharePoint admin center to set up a site redirect from the old URL to the new one, which helps users who bookmark the old link.

ADVERTISEMENT