Skip to main content
All CollectionsMigrateCopyOther copy
Migrate sites with the same URL
Migrate sites with the same URL
Updated over 2 weeks ago

Having a source and destination SharePoint site with the same URL is possible, making it difficult for your connections in ShareGate Migrate.

This article describes how you can work around this problem.

How-to

Add alternate access mappings

  1. Go to the central administration on your source SharePoint and find the Configure alternate access mappings option.

  2. Choose the proper Alternate Access Mapping Collection.

  3. Click Edit Public URLs and enter something like http://migrationSource in the Custom field.
    This allows you to use http://migrationSource as the hostname and access a site on your source at http://migrationSource/sites/Sharegate, for example.

Modify the hosts file

You will need to use Notepad as an administrator to modify the hosts file. You will need to add the IP address of your source SharePoint server followed by the hostname from the alternate access mappings. In our example, the alternate hostname is migrationSource. You also need to add a line for the destination with the original URL. It should look like this:

10.0.0.1   migrationSource
10.0.0.2 originalURL

This allows you to use the URL you created in the Alternate Access Mapping to access your source SharePoint server. Adding the originalURL with the destination Sharepoint server's IP address will make all calls to that URL go to the destination server.

Here is the location of the hosts file for recent versions of Windows :

For Windows 11

  1. Search for Notepad, then right-click the Notepad icon and select Run as administrator.

  2. In Notepad, open the following file:
    C:\Windows\System32\Drivers\etc\hosts

  3. Make the necessary changes to the hosts file.

  4. Click File > Save to save your changes.

For Windows 10

  1. Search for Notepad using Cortana, then right-click the Notepad icon and select Run as administrator.

  2. In Notepad, open the following file:
    C:\Windows\System32\Drivers\etc\hosts

  3. Make the necessary changes to the hosts file.

  4. Click File > Save to save your changes.

With those modifications, you should be able to connect to your source and destination servers through ShareGate Migrate and complete your migration.

Did this answer your question?