How to set up DNS records properly for a migration
How to set up DNS records for a source and target domains, to make the cross-domain migration flawless.
Please be aware that steps below are for cross-domain migration and assume both domains should be resolvable in public DNS records. This is the case, for example, when you are migrating to a different forest with a different domain or to a different domain in the same forest but in different site. There are many possible migration scenarios - see a description of some of them in CodeTwo Exchange Migration user's manual. Please review the whole article below before you start applying any changes.
The bottom line is that you must be able to connect to the target server from within source server environment using target server's FQDN (check that by pinging the target server using its FQDN). For this to be possible, the following should be verified and amended, if necessary:
- Public DNS records must be properly configured for both source and target domain.
- Source server local DNS records should match public DNS records (for the target domain).
- Sometimes, source server local DNS may require adding A and SRV records for the target domain.
- Migration to Office 365 requires only proper Autodiscover and msoid records.
- MX records are not used by CodeTwo software at any point.
First, please ensure that appropriate A / NS / CNAME record is set for both source and target domain in public DNS by checking with your domain registrar:
- If a domain should point directly to your server, add an A record with IP address of the server.
- If you wish to create non-direct association, so domain points to some name servers, which in turn return IP address of the server, add NS records with addresses of name servers.
- If your domain is an alias of some other domain, please add a valid CNAME record with name of the primary domain.
Be advised that such changes needs to be propagated over the Internet. In the worst case scenario you may need to wait up to 48 hours for the process to complete, depending on TTL property of the DNS entries.
If you are running a local DNS server, please compare the information reported by your DNS server (e.g. using nslookup command) with any public service that is able to read DNS records (such as mxtoolbox.com website). If there is inconsistency, you have to resolve all differences before going further. To discover these differences, you can follow the steps below:
- Open the MXtoolbox DNS Lookup website.
- Check the domain in question and write down the results.
- On a machine where CodeTwo software is installed, open command line prompt (cmd).
- Execute the following command, providing the desired domain and address of your DNS server:
#In the example below server localhost is asked about domain1.example domain nslookup -q=a domain1.example localhost
- Compare the result from step 2.
If the source machine is unable to resolve the FQDN of target server (e.g. using ping command) despite other steps from this article being done, that means you also have to add A and SRV records to the source DNS. To add the A entries you will need the IP addresses of the target Exchange server and target Domain Controllers. However, the SRV records need to be read directly from the target DNS Manager:
- Head to the machine on the target environment, which runs the DNS role.
- Open DNS Manager.
- Expand Forward Lookup Zones/<your domain>/_tcp.
- Note down all records with all their values.
Once you have sufficient information about target environment, you can add the records to the source DNS server:
- Head to the machine on the source environment, which runs the DNS role.
- Open the DNS Manager.
- Right-click Forward Lookup Zones and choose New Zone...
- Select Primary Zone and your preference of data replication.
- As the Zone name set target domain, e.g. domain1.lab.
- Complete the wizard.
- Choose the newly created zone from the tree.
- Add Host (A) entries for the target Exchange server and target Domain Controllers.
- Now you can begin to provide the SRV records. For every record noted previously:
- Right-click the right pane.
- Choose Other New Records...
- Select Service Location (SRV).
- Hit Create Record...
- Use the information noted down previously to fill the requested fields.
- Last but not least, on the machine that runs the migration software, run the following command as an administrator:
From now on, you should be able to connect to the target server. Although, if the solution does not work for you, it may be a good idea to setup a trust relationship between source and target domain.
In the case there is still no connectivity via FQDN, but you are able to ping your target server via IP address you can still migrate with CodeTwo software. However, the configuration will be more difficult e.g. you will not be able to list target server mailboxes and automatch them with source mailboxes.
If you have an Office 365 subscription, but the domain is not managed directly on Office 365, please double check whether following records are present in DNS configuration of your domain. The following entries are important from the application point of view, since they enable proper behavior of Autodiscover. More information about setting up domains you may find in Office 365 documentation.
|TYPE||Priority||HOST NAME||TARGET ADDRESS||TTL|
Please be aware that every record have its own Time To Live (TTL) property. After changing the records you have to wait the chosen amount of seconds before going further. Therefore, for the records shown above you have to wait an hour since there are 3600 seconds.
Changes made to the MX records of your domain should not affect behavior of our software. However, all A / NS / CNAME records must not be modified, since after such a change, the software may attempt to contact inappropriate server.