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 Answers 3

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.

2
  • ps: for step 5, i'd delay it for a week or two at least, just to be sure.
    – cas
    Sep 3, 2009 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. Sep 3, 2009 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.

3
  • Nope; there is only 1 domain name. The domain is registered in the UK but points to the US nameserver Sep 3, 2009 at 10:46
  • Essentially we're moving server but keeping the domain name and don't want any down time :-p Sep 3, 2009 at 10:47
  • Not sure what happens during the interim period of updating the DNS caches around the world :-p Sep 3, 2009 at 10:48
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.

1
  • 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 ;-) Sep 3, 2009 at 11:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .