Moving a web site

I happened to have the occasion to move a web site today. We moved MarketingFix.com from one server to another, but we didn’t move the DNS yet (because we hadn’t set up email and all of the internal lists we’re still running @marketingfix.com) so, we had to figure out how to send traffic coming to http://www.marketingfix.com/* to http://www.up2speed.com/* (and keep the pages the same).

One of the team members, Olivier, found this code:

RewriteEngine On

RewriteRule ^(.*)$ http://www.up2speed.com/$1 [R=301,L]

at WebMasterWorld. He then showed me how to test your redirects using this redirect tool.

4 Responses to “Moving a web site”


  • That’s rather a roundabout way of doing things. You could have easily changed the IP address of http://www.marketingfix.com to the new host and that wouldn’t affect the mail at all, since DNS uses different records for email (MX records) and they currently point to mail.marketingfix.com.

    Besides, there are easier ways of redirecting sites than using Apache’s mod_rewrite; Apache also has a Redirect directive that is easier to use in instances like this (I used this several years ago when my homepages moved from one domain to another and the entire redirect took only one line).

  • Our concern was to redirect traffic in a way that is compatible with search engines. MarketingFix had 2,200+ pages indexed in Google, and 301 redirects is what Google recommends (as opposed to meta redirects.) We want to be able to stop using marketingfix.com eventually, so our goal is to have search engines index up2speed.com then drop marketingfix.com. We’re also concerned about showing duplicate content since that might hurt our ability to be indexed.

    No doubt there are many ways to do all that, this one seems to work properly so far.

    Regarding DNS/MX, it’s my experience that once you change DNS entries for the web server, MX entries are updated too, unless you ask your host company not to. We didn’t want the extra hassle (make a support request to handle MX differently from the main DNS, pray that it’s done on time) while we were busy with the migration.

  • Sean is right, mod_rewrite seems like using a sledgehammer to hang a painting. You can do something like this:

    Redirect permanent / http://www.up2speed.com/

  • So John…if I moved adrants.rantworks.com to http://www.adrants.com, what’s the best way for me to re-direct all old adrants.rantworks.com links over to adrants.com? Both sites are still live now. I’d love to have all old adrants.rantworks.com links be re-directed to corresponding adrants.com links. Do I do it with an htaccess file? Thanks, I’m dumb with this stuff.

Leave a Reply