Forum Moderators: phranque
Could a javascript like this attract a penaly on my page from Google or other significant search engines?
I have a robots.txt, and one day I will try to understand that vast WebmasterWorld thread on banning.
My java script:
<script language=javascript>
<!--
var bitone = "so";
var bittwo = "andso";
var bitthree = ".com";
document.write("<a href='http://www." + bitone + bittwo + bitthree + " 'target='_blank'>So And So</a>")
//-->
</script>
If anyone visits the site running the Google toolbar, the site will eventually be spidered by Google on its own, having nothing to do with your link unless they specify in a robots.txt that they don't want ANYTHING indexed.
If they have a working robots file to make sure they're not indexed, then you can just give them a regular link - no need to hide it in Javascript.
User-agent: *
Disallow: /
I trust Google with a robots.txt. Its those desperate and rubbish SEs that spider without respecting robots.txt that I want to prevent.
Thats why I have the javascript link. However I have heard Google is careful about javascript because there are tricksters who use javascript to hide redirects etc.