Get email alerts when you get new backlinks with our SEO tool Start your free trial now

Press enter to see results or esc to cancel.

The Ultimate Guide to JavaScript Backlinks: The Hidden Links You’re Missing

JavaScript backlinks are lingering question marks for SEOs.

We know that they’re executed in JavaScript, rather than coded in HTML with the classic form of anchor text.

And we know Google tracks them.

Google told us this in 2014 and Search Engine Land reported on tests that confirmed it in 2015.

Elephate ran an in-depth study in 2017 and confirmed that Google does crawl and execute JavaScript even for websites built on JavaScript frameworks like Angular, React and Vue instead of a traditional CMS like WordPress.

But until recently, SEOs and webmasters haven’t had any insight into the JavaScript backlinks pointing to their sites.

It’s been difficult to discover them in the first place.

Most of our favorite SEO and backlink tools aren’t able to see them at all.

In fact, I’d venture to say that most SEOs and webmasters don’t even know about the existence of JavaScript backlinks.

So, let’s start with the basics.

Answers to the FAQ About JavaScript Backlinks

What are JavaScript backlinks?

A backlink contained in JavaScript code is a JavaScript backlink. (Easy, right?)

But what exactly is JavaScript?

JavaScript (JS) is a web programming language. It runs and executes in the web browser.

It’s different than HTML, which is static. Think of HTML as the bones of a website, and JavaScript as the muscle. While HTML determines the structure of a website, JavaScript lets the elements on a website change and move.

For an example, scroll down on this page. The lightbox that pops up? That’s controlled by JavaScript.

How do backlinks end up in JavaScript?

To answer this question, we first need to answer: What is a backlink?

A backlink is a hyperlink to another web page. In the SEO world, we call them “backlinks” because they link back to our sites. But make no mistake: a backlink is a hyperlink.

There are many ways backlinks end up in JavaScript code. Here are some of the most common examples:

  • Redirects
  • Drop-down menus
  • Dynamically inserted content

All of these are essential features of the web. Redirects commonly occur after someone submits a form and you send them to a thank you page—this is good functionality and that redirect constitutes a backlink to your thank you page.

When you click a drop-down menu, you’re triggering JavaScript that creates new elements on the page (the items in the drop-down). If any other things items link to another page, guess what? That’s a JavaScript backlink.

For an example of dynamically inserted content, scroll down this page until a lightbox appears. That’s dynamically inserted content—you trigger the JavaScript code that lives on this page by scrolling down, and the lightbox that appears has buttons that contain backlinks to other pages on this site.

How are JavaScript backlinks different than “normal” HTML backlinks?

Because JavaScript runs in a web browser and Google originally didn’t use a browser to crawl pages. Therefore, Google didn’t execute JavaScript.

Thus, any part of the page that was rendered in JavaScript wouldn’t be seen by Google.

And while Google has advanced and now executes JavaScript (there are even reports of conversion rate optimization tests being indexed in Google), most of the tools SEOs use to gain insight into backlinks don’t.

Because our tools are blind, we SEOs and webmasters are also blind.

How does Google treat JavaScript backlinks?

Like every other backlink. Here’s Google’s confirmation:

There’s one little snag to be aware of, and it comes down to timing. If you’re dynamically adding the rel=“nofollow” snippet and this happens after Googlebot indexes your JavaScript, then it will index that link as a dofollow link.

This makes sense. Changing the page after Googlebot arrives and expecting Googlebot to pick up on those changes is silly.

That’s all great…but why should I care about JavaScript backlinks?

If you’re reading the Monitor Backlinks blog, you probably care about backlinks.

So, there’s that.

I’d bet you’re definitely aware that your backlink profile is one of Google’s top 3 ranking factors.

We’ve covered the reasons to keep a clean backlink profile before, but to recap:

  • Poor visibility of JavaScript backlinks impacts your ability to keep a clean backlink profile. If you can’t see all the links pointing to your site, you don’t know which links to disavow. Your ability to combat negative SEO is weaker.
  • Likewise, since Google can see JavaScript backlinks, it’s likely using them in its evaluation of link-based penalties. If you can’t see backlinks from JavaScript, you have no way of combating a penalty that’s based on bad JavaScript backlinks.
  • Knowing who has linked to your site gives you a valuable opportunity to cultivate a relationship. Missing JavaScript backlinks means you miss that opportunity.
  • Google uses internal links to learn about your site’s architecture. Understanding the JavaScript internal backlinks in your site gives you a better understanding of how Google perceives your site’s architecture.

If you’re ignoring JavaScript backlinks and you notice your rankings and traffic and revenue are dropping, perhaps it’s because you’re being attacked by JavaScript backlinks that most SEO tools don’t report on.

Is it beneficial to build or have JavaScript backlinks?

Yes. Since Google treats all links coming to a page as backlinks, regardless of whether they’re coming from HTML or JavaScript, having JavaScript backlinks is a good thing.

However, all the caveats around building links still apply. You don’t want to build spammy backlinks to your website. You also don’t want to build JavaScript backlinks that somehow subvert Google’s guidelines and best practices.

We’ve mentioned that you shouldn’t hack other websites to hide backlinks in JavaScript before, but I wanted to take this opportunity to remind you not to do that. 🙂

Are JavaScript backlinks safe to have in my backlink profile?

Yes. Like Google said, a link is a link is a link. There is no difference between a link that comes from HTML or a link that comes from an element controlled by JavaScript, or from JavaScript code itself.

The only exception is when these links come from malicious code or when JavaScript is abused to insert links to your site.

How can I see my site’s JavaScript backlinks?

So, you want to see the Javascript backlinks pointing to your site.

The best way to do this is to get a tool to track them down for you.

At this time, Monitor Backlinks does not give webmasters and SEOs visibility into JavaScript backlinks. We rely on Majestic SEO, which doesn’t detect them.

That said, there are some crawlers which do report on JavaScript backlinks.

Some notable exceptions to crawlers that don’t report on JavaScript backlinks include Ryte and Majestic SEO.

Why don’t most SEO tools report JavaScript backlinks?

Because the amount of horsepower required to execute and report on JavaScript backlinks is immense.

Dmitry, the founder of Ahrefs, said this in an interview with Search Engine Land:

To execute JS for every page at our scale [would] require 10,000-15,000 servers, and we believe our customers are not ready to pay for that yet.

That said, as JavaScript becomes more and more ubiquitous (and more SEOs demand to know about which JavaScript backlinks are pointing to their site) and the cost of creating and maintaining servers goes down (as it does every year), we can expect these tools to report on JavaScript backlinks in the near future.

Final Thoughts on JavaScript Backlinks

JavaScript isn’t going away. And as JavaScript becomes more popular and prevalent, the need for SEOs to understand which JavaScript backlinks point to their sites only increases.

JavaScript backlinks appear on many traditional on-page elements like lightboxes, drop-down menus and dynamically inserted content. With a few rare exceptions, Google crawls these elements and indexes these links as if they were normal HTML links.

I wouldn’t ignore them.

Comments

Comments are disabled for this post

Monitor Backlinks

Free 30-day trial with Monitor Backlinks:

Discover your backlinks
Discover your competitors' backlinks
See Keyword rankings
Get E-mail alerts when you lose or gain new links

Use our free Backlink Checker to instantly get a list of backlinks for any website.