Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a javascript code on my site who displays links from another site.

This is what I have on my source before:

<script language="JavaScript" type="text/javascript">showLink(1);</script>

This is what I have copied from my source after the page has loaded:

<script language="JavaScript" type="text/javascript">showLink(1);</script><a rel="nofollow" target="_blank" class="anc" href="http://x5.external_site.net/sc/out.php?s=5483&amp;o=http%3A%2F%2Fwww.bluetooth.com">Bluetooth Devices</a>

Can google see this link?

share|improve this question

3 Answers 3

Yes as long as the <a> with href attribute is being rendered on the page it's going to be found by Google this is a regular link and how it ended up on your page doesn't really matter.

Google can render JavaScript all JavaScript how much they can understand is anyone's guess considering how varying code can be written. But they're surely looking for links and however they're created if it ends up being an <a> I would assume they see it.

share|improve this answer

Probably. Search engines can read basic JavaScript so this seems simple enough for them to read and understand. if you don't want them to read and understand it then block the JavaScript file using robots.txt.

FYI, if you are doing this for SEO purposes this is considered black hat SEO and could potentially get you penalized up to and including banned.

share|improve this answer
    
The question should have been - can google read external javascript. Because what showLink(1); does is gets the info from an external site and writes it in my page. But I'm not sure if it's doing it after the dom has loaded; and why does the rest of the code appear in my source after the DOM –  webmasters Jul 20 '12 at 12:56

GoogleBot now interprets JavaScript and can see the page layout after all JavaScript is processed, so yes they can see that!

share|improve this answer
2  
Googlebot cannot interpret all JavaScript. Only some and those limits are not known. –  John Conde Jul 20 '12 at 15:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.