Is this white hat or black hat?

wingman80

Regular Member
Joined
Aug 13, 2009
Messages
462
Reaction score
49
Good day!

I would like to ask regarding a link into a page. For example your client wanted to have a more pleasing kind of link and choose to have a javascript link which are not crawable by robots. Is it good to put a hidden link for robots?
 
it's cloaking, Bot and user see different contents. And of course it's black hat. I would suggest to use PHP to hide your link since bot can read and understand your JS script.
 
Google reads JS links and methods for a long time. so, if your JS links look like the following HTML-built in JS functions, it wont considered hidden and Google will follow such links:

Code:
1. <a href="javascript:var test=window.open(‘http://domain.com')">my link here</a>
2. <script type="text/javascript">document.write("<a href=http://mylink.com‘>link here</a>");</script>

As it seems, and according to my tests, Google can read JS of known libraries (like jQuery), known built in functions (innerHtml, window.open, document.write etc) and HTML-built in JS functions (like: onclick, onload etc).

Google has real problem to execute JS complex custom-made functions, since the Google crawlers are text-based interpreters that simply parse content / code (hence it's easy for them to find url patterns in your code - even under JS functions), they can't execute (still) complex JS functions since they will have to execute them like a browser - which will be obviously very slow for Google crawlers to do; assuming they have to crawl millions of pages every minute or so.

So, to your question, such links are crawlable, and wont considered hidden text / links
 
Back
Top