How to add/retain rel="nofollow" in every anchor tag

sagar mistry
sagar mistry used Ask the Experts™
on
Update please
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technical Specialist
Awarded 2017
Distinguished Expert 2018
Commented:
You can do it with JQuery, Google execute Javascript or a simple "Find and Replace" with FNR.exe https://findandreplace.codeplex.com/
    $( document ).ready(function() {
        $('body > a').attr('rel','nofollow')
    });

Open in new window

Dr. KlahnPrincipal Software Engineer

Commented:
Hmmm ....

I think this should be applied only to <A HREF ...> anchors.  There'd be no point in applying it to <A NAME ...> anchors.

Author

Commented:
how do i increase my index for my websites?
Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

Commented:
Can apply to all <a> irrespective if it contains a HREF
Shaun VermaakTechnical Specialist
Awarded 2017
Distinguished Expert 2018

Commented:
Best answer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial