1

We're in the process of moving applications from our USA server to our UK based server; They're basically the same platform (LAMP) slightly different versions but not enough to cause too much of an issue.

The question I have is: We have domain names for each of the applications, all registered to the nameservers of the US box, and they will need to be changed to those of the UK box - this is quite easy to change but would result in clients going to either box depending on how the chain between them and the server caches the dns records.

Once the name servers have been changed, is it possible to get the OLD server (in the US) to somehow redirect clients to the new box via IP?

The way we have apache running is using virtual hosts so all the application requests need to look like they came from the right domain; I'm not sure if this would cause an issue either.

Many thanks, Chris

3 Answers3

3

this is just a standard redelegation. general procedure is as follows:

  1. first, change the DNS on your current nameserver so that the web site points at the new UK-based host.

    reduce the TTL for the domain at the same time. set it to 5 seconds or something low. make a note of the current TTL.

  2. copy the zonefile(s) from your current name server to the new one, and set it up to serve your DNS.

  3. send a redelegation request to your domain registrar to redelegate your domain to your new nameserver.

    at this point you'll have two name servers serving the same data, both pointing your web site to your UK host.

  4. at some time in the future (at least as long as the original TTL before you changed it), you can increase the TTL back up to whatever it used to be.

  5. even further in the future, at least 2 or 3 times as long as the original TTL, you can turn off your old nameserver. you only need to delay this step so long because there are a lot of broken nameservers out on the net that ignore TTLs and cache domain records for as long as they want.

cas
  • 6,783
  • 32
  • 35
  • ps: for step 5, i'd delay it for a week or two at least, just to be sure. – cas Sep 03 '09 at 11:41
  • 1
    Exactly what I was thinking. The country or provider where the DNS is hosted doesn't need to change in order to move the app. Don't move the apps and DNS servers at the same time. Move the app to the new server and change the ip in your current DNS to the new appserver. Only when clients are succesfully using the new server move the DNS according to the above steps. – Martijn Heemels Sep 03 '09 at 12:19
0

So, you got an US doain name and an UK domain name, correct? You want the US domain to exist in the UK Name servers?

Then copy the domain records from US servers to the UK Name servers, then delete the records from the US boxes and assign FORWARDERS on them. That should do the trick.

Then all DNS requests will be forwarded to the UK servers trough the old DNS servers.

MrTimpi
  • 445
  • 4
  • 11
0

I think you want to do this at an IP level, so DNS isn't an issue.

You could leave a server in place with the old domain, and have it forward requests. You could do this with a reverse proxy using mod_proxy with Apache, or iptables with Linux.

I would opt for iptables myself. This link has rules that will do what you need I think for iptables.

Kyle Brandt
  • 83,619
  • 74
  • 305
  • 448
  • IP level probably isn't the right term, since Apache would be 'application level', but lets not get pedantic, is too early for me to think of the right words ;-) – Kyle Brandt Sep 03 '09 at 11:32