301 redirects

Matt

TPer Emeritus
Messages
22,999
Name
matt
Edit My Images
Yes
Anyone got any tips for 301 redirects, got an old site which ranks well, and a new one that has different url structure etc, want to redirect one site to the other with the minimum of fuss and best SEO, any tips welcome!
 
no-one? really?
 
I'm not sure what technology your web site uses, but for an asp or asp.net web site you would replace each old page with the following lines of code (in VB or VBScript):

Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://your.website.com"

In PHP it would be:

Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://your.website.com" );

substituting the page you want to link to in the above examples.

If your web site is just HTML, I believe you can do it with htaccess (on a Unix server) but I don't know much about that.

301 redirects are worth doing if your web site is well ranked. It "officially" tells the search engines that your page has moved.

Alternatively you can just specify a 404 page as a general catch all for any page that is not found in your web site, but this is not as good for the search engines.

Jenny
 
Last edited:
thanks for the answers..

Its apache, so its a .htaccess

i tried each line for the main pages, if I do this:

redirect 301 / http://www.thenewdomain.com it works, but direct inbound links from google then default to the index page

i tried doing individual pages but kept getting a 501 server error, so im sure that something went wrong somewhere, or there is a setting i need to change...
 
hi Jenny

if i do a site redirect, redirect 301 / http: etc should put any page to the new domain, for the individual page I would use redirect 301 /path/oldpage.html http://newstuff but thats chucking up the 501, i tried googling but just cant get that.
 
i'll check with the hosts, cant see that anything else is wrong.

thanks for the help
 
Back
Top