0

For SEO rankings, I need to remove the "nofollow" attribute links from the entire site.

So far, I'm assuming I need to create a variable which grabs all the anchor tags, and then loop through it, but I'm not certain how to target the actual "nofollow" attribute, in order to remove it, once I've looped through everything.

const grabLink = document.getElementsByTagName("a");

for (let i = o; i < grabLink.length; i++ {
    // would this be the correct approach?
      grabLink[i].target = "" 

}

If my approach is wrong, I'd like to hear an explanation as to why, so I can learn for next time.

Dave789789
  • 23
  • 1
  • 8
  • This seems to be more a text editor/ IDE stuff rather than codebase. A global search for 'nofollow' on VS Code will help locate all links that has it. – Adedoyin Akande Dec 14 '21 at 07:22
  • 1
    I would have liked to do it that way, but the problem is that it's a giant site hosted on Wordpress, so finding it through an IDE is a bit of an issue. I've even used a plugin to locate the page where the links are on but haven't had much luck. – Dave789789 Dec 14 '21 at 07:38

0 Answers0