How to set all Tags to no-follow using javascript?

JimHalpert

Supreme Member
Joined
Jan 16, 2016
Messages
1,345
Reaction score
292
Hi everyone, is there a guide somewhere on how to setup no-follow for all TAGS on my entire website?

Thank you.
 
document.querySelectorAll('a').setAttribute('rel','nofollow');

QueryselectorAll retun an array so put that code into a loop statement and cicle the entire process, remember to increment variable I if you aren't using for loop.
 
Back
Top