A Way to redirect old server to new server? w Same domain
However, just to be sure that everyone goes to the right server, I'd like to setup a redirect from the old server to the new one. Since the domain name won't change though, I'm wondering if there's a way to do that?
I'm looking preferably for something easy to implement on the old server so that it simply sends people to the new one, since I'm not exactly a pro with Linux (I can follow a guide without a problem though.) Once again, the domain name, content and all the urls will be the same, everything is synced, only the server will change.
Any help would be much appreciated, please include as much details as possible.
Thanks a lot,
Mathieu
7 Replies
1) Drop the TTLs.
2) Add two new DNS records:
www-new.example.com IN A new.ip.address.here
www-old.example.com IN A old.ip.address.here
3) On the old web server, add a ServerAlias www-old.example.com (or your httpd's equivalent).
4) On the new web server, add a ServerAlias www-new.example.com.
5) On the new web server, put a maintenance-in-progress placeholder on example.com and
6) When the time comes, replace the old web server's configuration for example.com &
7) As soon as you're ready to "go live" on the new server, zap the placeholder and let traffic fly. On the old server, install a redirect on example.com and
This is a "break-before-make" move; your site will be "down" for some amount of time while you copy files, move the database, and test stuff. There are ways to do this with no downtime, too, but that gets fairly specific and specialized.
I've heard of swapping ip before and yes, both Linodes are in the same datacenter, so that would be possible.
However, before choosing that, I'd like to know:
How long does it take to swap ip?
Will I need to restart the server?
Will the new server be live when the ip swap is done or there are any additional steps?
Are there any drawback(s) to this method?
Don't mind my questions, I just want to be 100% sure that the transition between the two servers goes smoothly.
Thanks!
How long does it take to swap ip? - Instant
Will I need to restart the server? - They both need to be shutdown to swap them
Will the new server be live when the ip swap is done or there are any additional steps? - Depends on your server configuration if you have a static ip configuration you will need to update this BEFORE you shutdown the server
Are there any drawback(s) to this method? - None that I can think of
> - Will I need to restart the server? - They both need to be shutdown to swap them
Good to know, thanks.
> - Will the new server be live when the ip swap is done or there are any additional steps? - Depends on your server configuration if you have a static ip configuration you will need to update this BEFORE you shutdown the server
I just have whatever ip was attributed to my linodes when I got them. As far as I know, that's not a static i.p, but correct me if I'm wrong.
Thanks for your help.
Wonderful. Thanks a lot for your help, much appreciated.