Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have a domain pointing to the IP of a server I want to get rid of.

On another IP, I have my server set up entirely, and I now want to (temporarily) get all visitors to this new server, without them noticing a difference in url.

I am aware I can just change the A record of my domain's DNS, but since I want to perform a temporary test for a few hours, I need the change to be immediate. I understand that A-record changes can take quite a while (due to the TTL that I cannot change) before being propagated to all users.

Is there any other solution on how to do that? Can something like this be done with a rewrite?

share|improve this question
up vote 3 down vote accepted

You can setup the new server to act as a transparent http proxy for your old server, then flip the DNS. When you see clients starts to access the new, remove the proxy configuration temporarily.

If the new server is just a temporarily server, configure the old server to act as a proxy to the new server and leave the DNS as it is.

share|improve this answer
Thanks! I'll try this: – Steven De Groote Mar 28 '12 at 9:27

If you can't change the TTL of your domain and you don't want a different URL, the answer is proxying.

The exact instructions will depend on what you have installed and what you want to use but Apache, nginx, Varnish, Squid and HAProxy are a few examples of software that can do this for you. Set one of them up and you can switch between using the two servers as backends as often as you want.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.