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
- Go to the central administration on your source SharePoint and find the Configure alternate access mappings option.
- Choose the proper Alternate Access Mapping Collection.
- 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
- Search for Notepad, then right-click the Notepad icon and select Run as administrator.
- In Notepad, open the following file:
C:\Windows\System32\Drivers\etc\hosts - Make the necessary changes to the hosts file.
- Click File > Save to save your changes.
For Windows 10
- Search for Notepad using Cortana, then right-click the Notepad icon and select Run as administrator.
- In Notepad, open the following file:
C:\Windows\System32\Drivers\etc\hosts - Make the necessary changes to the hosts file.
- 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.