Do links injected with javascript count towards google SEO ?

SmTasker

Elite Member
Jr. VIP
Joined
Oct 26, 2007
Messages
3,172
Reaction score
952
Not sure if I am explaining this correctly, however I stumbled upon a site that shows links as text intially and it injects the link with javascript when it loads the page.

Let me give an example for better understanding, something like this comes from the site:

Code:
 <div class="description"><p>url here in blank</p></div>

And after that they modify it with javascript in

Code:
 <div class="description"><p><a href="url" target="_blank">title</a></p></div>

like you can see here :

Code:
https://schoolido.lu/user/sevenmentor9090/

So...do these kind of links still offer any SEO value

Thanks!
 
Yes, but only if Google can properly render and see them. If the JavaScript loads clean &lt;a href&gt; links in the DOM, they can be counted.

That said, they’re less reliable than standard HTML links, so for SEO it’s always safer to use plain, crawlable links.
 
Looks like autolinker.js is doing that. Google will be able to see it as a link, but with a few caveats:
As it's rendered via javascript, it's deferred crawl until Google will see it, and that crawl is not guaranteed. The domain would have to be pretty juicy, and the profile pages themselves of a decent enough quality to justify web rendering being performed on them.
Also, if a link only exists after a Web Rendering Service pass, it's likely to have little benefit or priority over anchor tags that were present in the initial html crawl.
 
Thanks for the reply guys!
 
No, those links won't pass seo value. googlebot executes javascript, but it's not guaranteed to be the same as a real user's browser. they're likely seeing it as just text. it's a bad practice anyway. for actual seo, just use standard html for your links.
 
the question isn't "is it javascript." the question is "does google see it after rendering." i've seen js links indexed and passing signals. i've also seen them ignored. easiest test is search console, crawl tools, and checking the rendered source. plain html links are still the safer bet when money is involved.
 
You mentioned a site that initially outputs links as plain text and then injects the actual &lt;a href="..."&gt; links with JavaScript after the page loads. That's a technique sometimes used for spam prevention, tracking, obfuscation, or SEO-related reasons.
 
They can still have some value if google renders the JS and sees the final link But I wouldn't rely on them too much. A normal link in the html source is safer and usually more reliable for SEO
 
They are counted for SEO if the link is displayed in page source after page load. Normally, js links are considered less reliable so Google may discount them or even issue a penalty if they are malicious.
 
Thanks for the replies guys, so the consensus is they might be a little hepful but mostly now and ideally stay away, got it!
 
Back
Top