This is a simple google-friendly 3-line php redirect script, using the server side 301 (Moved Permanently) redirect. Perfect to keep count of all your exit links.

Google and redirects:

What does google say about redirects? In general they don't like redirects, cloaking or "sneaky redirects". By "sneaky redirects" they mean a website redirecting Googlebot to a different page than what visitors to the website see.

How does Google 'flag' or penalize these scripts? The penalties mostly apply to javascript redirects, meta refresh is also penalized, as well as server side temporary redirects (302, 303, 307, etc..).

So all that leaves us with is the permenant server-side redirect, 301. Thus the script below is what I would call a search engine safe redirect script.

This makes sense, since the redirect you are employing is ALWAYS permanently moved to the URL address you supply. The only reason you employ it is to track and count outgoing links.

Google Pageranking Tip:

The tip in a nutshell is do NOT USE the parameter 'id' in your url string. You can accidentally hide your pages from getting properly indexed by Google if in the URL string you have the 'id' parameter. Google would then assume that is a session id and would not follow the link.

i.e. "/jump.php?id=http://www.domain.com". The link is then NOT traversed by the bot. The bot effectively ignores the page.

This method has also been used by some webmasters to retain pagerank of a page by giving links out that contained dummy parameters passed to them; the website that gets this request would simply ignore those parameters. Googlebot however might think it was looking at a session id link and ignore it.

Google - safe 301 redirect script:

Below is the redirect script called jump.php, save it to a file and test it:

exit;

?>

Comments

  • joel
    nice solution - thanks!