Forum Moderators: Robert Charlton & goodroi
An example I have is if someone clicks a link of where they can buy our product it goes to a page www.example.com/forward.php?url=http://another.example.com
On this page it just contains a PHP Header Forward, header("Location: [another.example.com");....]
So to the user they think they are just going straight to the new website, whereas they are actually going to a page on my website that records they clicked that link and then it forwards to the new site.
Reason I ask this is because I noticed Google indexed the pages with the forwards (ex. www.example.com/forward.php?url=http://another.example.com)
Could this effect my rankings with Google? How does Google look upon sites that use this forwarding method?
Thanks in advance for your help!
Wes
[edited by: msgraph at 9:09 pm (utc) on June 6, 2005]
[edit reason] example'ized [/edit]
header("HTTP/1.1 301 Moved Permanently");
header("Location: http ://www.example.com/");
Personally, I prefer the approach which provides a direct link (no redirect) but overridden by a Javascript onclick event - because it gives more accurate click-thru rates as human visitors almost always have Javascript enabled and bots don't (so you're not counting the bots).
<a href="http:// www.example.com/" [b]onclick="window.location.href='/forward.php?url=http://www.example.com/';return false;"[/b]>Your link text</a> As the bots could pick up the onclick event as another URL to parse, you should exclude the click-track script (forward.php) in robots.txt. Replace
window.location.href with window.open if you want the link to open in a new window.