You might be in a rush to gain backlinks from other sites so as to promote your own site. Gaining dofollow links (links that are crawled by search engines) is critical for website ranking. That’s why we shared the best sites that offer dofollow backlinks in our previous post. But how do we know which links are dofollow and which links are nofollow? There are a couple of ways to figure it out. But today, I am going to share with you a javascript code that labels links according to their type. All you have to do is paste the code into your browser console. The code automatically extracts links within the webpage and displays appropriate labels next to the links.

Javascript code snippet to check dofollow links

The Code in Action..


A gif showing dofollow links detector

  1. Open your browser console and copy-paste the code into the console.Hit enter.
  2. That’s it! All nofollow links and dofollow links will now be labelled accordingly in the website.

Alternate method to check if link is dofollow

Sometimes websites use scripts to automatically make outbound links nofollow. In such situations the nofollow label trick may not work as expected. You can follow this alternate method to determine whether a link is dofollow or nofollow. identify-dofollow-links.

  1. Right click on the link and choose “Inspect Element”.
  2. Observe the corresponding HTML code and compare it against the below format.

The html code for nofollow links will look like this :

<a href=”LINK” rel=”nofollow”>TEXT</a>

If the term rel=”nofollow” is absent, then the links are dofollow.

The comments section must contain links so as to test whether they are dofollow or not.

  • Ivan