Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Google and Redirects

         

steveweber123

6:59 pm on Apr 9, 2007 (gmt 0)

10+ Year Member



I have spent some time searching old posts for an answer to these questions but haven't found any.

1. Which of these scripts should I use to redirect an affiliate link? I can't get .htacces to work with my host.

2. Should I include a no follow tag in front of the cloaked link on my page?

3. Are these "Google Safe"? Is there any way that using these to redirect links can hurt my site?

Any advice or comments about this process will be appreciated.

Script 1:

<?php header( "Location: http://www.example.com " );?>

Script 2:

<?
header("HTTP/1.1 301 Moved Permanently");
header("location: http://www.example.com");
exit();
?>

Thank you for your help,

Steve Weber

jd01

8:41 pm on Apr 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Steve,

Script 2 is the correct choice:

<?
header("HTTP/1.1 301 Moved Permanently");
header("location: http://www.example.com");
exit();
?>

Script 1 will default to a 302 "undefined" redirect, since there is no indication of what type of redirect it is.

Justin