Whenever I move a site to a new server I usually backup>restore onto the new server then change the nameservers of the domain at the domain registrar so that it points to the new server and then you simply have to wait for propagation. However to speed this up can I adjust DNS records on the old server since I still have access to the old server and will do for a while?
So on the old server, which of these should I replace with the details from the new server?
I am guessing all those which contain the IP address, so:
the three ‘A’ records
the SPF record
What about the TXT record, which is for the domainkey (2014._domainkey.mydomain.tld). It does not contain the IP address but I am guessing it will be tied to the server, so it needs to be changed too?
Warning! Errors were found in this domain's DNS records : The DNS record mydomain.tld. resolves to the IP address 22.22.22.22 instead of the virtual server's IP 11.11.11.11
The DNS record www.mydomain.tld. resolves to the IP address 22.22.22.22 instead of the virtual server's IP 11.11.11.11
This domain has email enabled, but none of the MX records mail.mydomain.tld point to it. Either the MX records should be corrected, or the email feature disabled if mail is hosted externally.
A couple of days before the move lower the TTL time to a low figure, down to something like 5 minutes. In theory that should make the rest of the world resolve you within 5 minutes.
You pretty well got the right settings to change.
Is virtualmin sending that error?
I do that too Stefan, though have found that it can still take quite a while for some ISPs to catch up.
Yep, Virtualmin shows those errors. However I might need to come back to this as after restoring the backup on to the new server the site does not load, however I’ll post another thread about that now…
I usually do Stefan, but it can still take a while for some ISPs for some reason.
Since we run our own bind servers via virtualmin couldn’t we just update the dns records on the old server to essentially send all the traffic/details to the new server? As per my first post?
No that fine, it happens all the time. What is the old server Virtualmin?
At the registrar you need to adjust the ns1 and ns2 records to the new IP as well else nothing will change. Maybe thats the issue?
I was thinking maybe something I learnt in this thread might apply…
Hence I thought setting the A records IP address of the new server (on the old server) might help send people to the site on the new server more instantly : /
You are not obligated to change your glue records at the same time you migrate your websites. You can do it before or after or at the same time. I usually do it after (or not at all, since I mostly have DNS servers that are separate from my web/mail hosting servers).
You can update the DNS records on the old server as you move the sites. A quick sed or whatever. Since it’ll all be the same IP, it should be very easy to change all at once. And, then before you shut down the old server, update your glue records to point to the new servers.
There are no rules. Do it however you want, just think through the order of operations so you don’t break your sites. And, mistakes are less costly than they used to be (as long as you set your TTLs short), as caching that ignores TTLs is much shorter than it used to be.
That said, you may not be able to control the TTL for your glue records. That’s up to your registrar, and they probably don’t allow super short times. So, that may make a staged approach less disruptive, so the old servers can keep operating, but pointing to the new addresses, as glue records propagate.
Thanks Joe. So I can then do as I thought in the first post? (Leave the NS records as they are with the domain registrar for now and then edit the DNS records on the old server to point to the new server’s IP)
If that is the case, any idea why I got the error from Virtualmin?
Warning! Errors were found in this domain's DNS records : The DNS record mydomain.tld. resolves to the IP address 22.22.22.22 instead of the virtual server's IP 11.11.11.11
The DNS record www.mydomain.tld. resolves to the IP address 22.22.22.22 instead of the virtual server's IP 11.11.11.11
This domain has email enabled, but none of the MX records mail.mydomain.tld point to it. Either the MX records should be corrected, or the email feature disabled if mail is hosted externally.
I think I had only changed the A records and the SPF record (as those are the only ones which contained the old server’s IP - I just changed it with the new server’s IP).