Forum Moderators: open

Message Too Old, No Replies

Questions about switching hosting companies

         

Chair

7:29 pm on Sep 6, 2004 (gmt 0)

10+ Year Member



I switched my web site from one hosting company to another.

I've heard that it could be a good idea to leave the site on the old hosting company server for awhile ... I think for search engine purposes.

My questions are:

(1) Now that my site is running on the new company's server, would it be ok to cancel my contract with the old hosting company and take the site off their server immediately ... or is there some ideal period of time I should wait before doing so?

(2) Is there an optimal way to switch hosting companies without hurting Google ranking? (before, I had I good ranking, whereas now my Google ranking for this site is zero)

mincklerstraat

9:25 am on Sep 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Chair,

Your site probably has a different address now (url), since url's are unique and you can't really have the same site at the same url at two different hosts unless you're doing fancy load balancing server stuff.

What you can do is set up your old domain so it points to the new domain, so both users and spiders get automatically sent to the new address. This would be a good reason to keep your old site up for a while, and it should help you maintain your page rank. Make sure that your most important link partners know the new address, too, so they'll update their links. You need to send headers in order to point browsers and spiders in this way; this is much better than those 'refresh' thingies. Sending the headers is something the server does, you don't even see it in the source of a webpage, and it's a little more challenging than setting up a meta-refresh, but definitely worth it.

If you're on linux or bsd hosting and using apache, it's probably easiest to set up an .htaccess file to do this (that is, if your host allows for you to put up .htaccess files) that will look something like this:

redirectMatch 301 ^(.*)$ [newdomain.com...]
redirectMatch permanent ^(.*)$ [newdomain.com...]

If you can't, you can use a scripting language to do it- in PHP it'd be something like this for a single page
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".http://newurl);
header("Connection: close");
where $url is the new address. Do this at least for the homepage; if you know a bit of scripting, you could put on each page something like this

header("HTTP/1.1 301 Moved Permanently");
header("Location: [newurl".$_SERVER['REQUEST_URI']);...]
header("Connection: close");

there's info on doing it on microsoft platforms here: [seoconsultants.com...]

In the future, if you have your own domain name, you can just move the place that the domain points to from the old hosting service to the new hosting service. This is really the best thing to do if you move, then you don't have to do all this redirect stuff.

Chair

12:05 am on Sep 8, 2004 (gmt 0)

10+ Year Member



Thanks Mincklerstraat.

That's some good information.