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”
Leave a Reply
Search
Subscribe
Archives
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- April 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003
- August 2003
- July 2003
- June 2003
- May 2003
- April 2003
- March 2003
- February 2003
- January 2003
- December 2002
- November 2002
- October 2002
- September 2002
- August 2002
- May 2002
Categories
- asides (685)
- baby (6)
- design + dev (143)
- email (1)
- for sale (7)
- get a job (12)
- investing (6)
- leadership + management (163)
- life stories (262)
- macintosh (324)
- marketing + advertising (233)
- Moveable Type (52)
- organization (6)
- photography + video (68)
- publishing + content (136)
- random (490)
- Saab (1)
- sales and selling (99)
- small business (148)
- startup (3)
- stuff (71)
- sysadmin (41)
- travel (43)
- Video (8)
- windows (69)
- WordPress (13)
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.