Forum Moderators: open
Lets say that I have the need for the following link:
<a href="index.php?rd=off">Home</a>
Would a SE follow that link?
What if I write the link like this:
<a href="index.php" onClick="href='index.php?rd=off'">Home</a>
Would it follow the query string or just go to "index.php"?
Would use of the onClick have any negative effects with spiders?
If the spider only sees "index.php", that is ok.
-----------------------------------
The reason for needing this that when a vistor first comes to the site, "abc happens", and when they return to the home page from anywhere in the site "abc does not happen".
dhdweb
Onto your specific question, though... Your second suggestion won't work at all. The bots will find index.php, but you're not passing the parameter to them, only to the surfer.
In your second example:
The link to index.php?rd=off will send the spiders to index.php most likely.
A link to index.php?rd=on will send them to the same index.php page. Duplicate content...
One thing Googleguy suggests is that you don't put stuff into the URL that doesn't affect layout or content. These include session ID's, tracking codes, etc.
For example, if index.php?rd=off produces the exact same page as index.php?rd=off&ID=1, then ditch the ID=1 from it.
I have yet to see a major crawler that ISN'T fully capable of crawling urls as described in this. Some "don't" seem follow the links on my site, but I'm guessing they probably woudn't in the first place. I've got dynamic URLs listed at DMOZ (for news articles and such) and all the spiders hit them and index them with no problems.
G.
In your second example:
The link to index.php?rd=off will send the spiders to index.php most likely.
Sending the spider to index.php is not a problem!
------------------------------
So, what I gather from the above post is that I should just leave the link as it is now
"<a href="index.php?rd=off">Home</a>"
and I should not have any spider problems, correct?
dhdweb