Forum Moderators: Robert Charlton & goodroi
In order to stop these links from being followed by google I use a PHP redirect, plus a nofollow (on the PHP redirect) and additionally use my robots file to noindex the page with my PHP redirect list.
I am just wondering wether this could trigger/cause some form of over optimisation penalty?
1. Is to use a masked URl such as:
http://www.mysite.com/do/out.php?5578
where /out.php fetches the outgoing URl for entry 5578 from a database and returns:
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.example.com/outgoinglink/" );
2. Is to link out using something like:
http://www.mysite.com/do/out.php?visit=http://www.example.com/outgoinglink/
Then out.php extracts the outgoing link from itself using $_SERVER['REQUEST_URI'] and returns:
Header( "HTTP/1.1 302 Moved Permanently" );
Header( "Location: http://www.example.com/outgoinglink/" );
>>> I had a reason for making the second one use 302 instead of 301 but I can't for the life of me remember what that reason was ...
[edited by: tedster at 4:56 pm (utc) on Jan. 15, 2009]
[edit reason] de-link the examples [/edit]
hide outgoing links
Although true about hiding, do not forget the convenience of having links organized in a single file, being that JavaScript, PHP, or whatever.
Can you imagine running a site of 100+, or 500+ pages and having links hardcoded on each page? Who can maintain that? Nobody.
It's so easy to change the link in one single spot.
See also: [webmasterworld.com...]
.
*** It's so easy to change the link in one single spot. ***
Another way is to define all the links via an array, and simply insert the right link in the right content by referring to it that way. That way, there's no redirect involved.
But do not that for all or almost all your links. Link to relevant sites, that's important.
And I do not hardcode the links: those going to an affiliate site -when available- are nofollowed, redirected and robots'ed; if the link is not an affiliate one goes directly. But that's automatic.
To summarize: my experience says that disallow, redirect and nofollow is not a problem, but your site has to offer relevant links and content. But what I do is not for everyone maybe.
Another way is to define all the links via an array, and simply insert the right link in the right content by referring to it that way. That way, there's no redirect involved.
That sounds interesting to me - I always used term "redirect" to describe that particular action, but is it really a redirect if I say
script.php?link=link1
and code is something like if link=link1 then link=site.com and so on for X number of links.
Is this a redirect or an array?