Transition domain to new web host without waiting for DNS propagation

Solution 1:

here is a trick i use all the time... :) it assumes you control the current server.

put the site/db/whatever on the new server and on your old/current server, enable the proxy, proxy_http and the rewrite modules, then add the following lines on the apache config file for your old/current site:

RewriteEngine on
ProxyPass          /      http://<your-fqdn-here>/
ProxyPassReverse   /      http://<your-fqdn-here>/

lastly, add an entry on your the /etc/hosts file of your old/current server that has the following syntax:

<new-ip-address-of-ec2>   <your-fqdn-here>

that is it. you got a reverse proxy pointing to itself, but resolving its own name to your new server. when the dns propagation rolls out, then the new server will be hit directly. we call this neat little trick PRRP or Pseudo-Recursive-Reverse-Proxy.

For those pesky (by pesky I mean badly designed) web apps that require many holes poked on the firewall, this lets you leave just the reverse proxy server on the dmz and poke only ports 80/443 to the internal network.

Solution 2:

Have your old host proxy the http requests to the new host

Solution 3:

You might also be able to reduce the time you have to wait for the DNS propagation by getting the TTL for the domain name lowered preparatory to the move.