1. Home
  2. Computing & Technology
  3. JavaScript
photo of Stephen Chapman
Stephen's JavaScript Blog

By Stephen Chapman, About.com Guide to JavaScript since 2004

Site Redirect

Thursday October 23, 2008
JavaScript can help when you move your site

If you don't have your own domain name then when you move your site it will end up on a new domain. If you have any common JavaScripts shared between pages then you can easily update that script to redirect all of the pages on your old site to the corresponding page on the new one.

Site Redirect
Comments
October 23, 2008 at 7:58 pm
(1) PsyCho_killer says:

Using javascript to redirect to your new site will hurt your SEO. 310 header redirects are the way to go.

October 24, 2008 at 3:51 am
(2) Stephen says:

But if you don’t own the domain then you can’t set up a 301 redirect and a JavaScript redirect will at least get your visitors to your new site (presumably one where you do own the domain).

Everyone should know that a 301 redirect is best but not everyone has the access to set one up – hence the suggestion that a JavaScript redirect is better than not redirecting at all.

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.