nofollow

Discussion in 'Programming' started by adeniyi faith, Jul 22, 2017.

Tags:
  1. adeniyi faith

    adeniyi faith Regular Member

    Joined:
    May 15, 2017
    Messages:
    282
    Likes Received:
    61
    Gender:
    Male
    Occupation:
    BHW member
    Location:
    NIGERIA
    Hi guys I wonder if there is any line of code I could add to the footer or header of my site to set all out going links to NO-follow.
    Thanks in advance.
     
  2. proxygo

    proxygo Jr. VIP Jr. VIP

    Joined:
    Nov 2, 2008
    Messages:
    25,155
    Likes Received:
    11,064
    Gender:
    Male
    Occupation:
    PROXIES .
    Location:
    UK - ALWAYS ON BHW
    Home Page:
    u mean something like this

    <a href="signin.php" rel="nofollow">sign in</a>
     
    • Thanks Thanks x 1
  3. mlori

    mlori Newbie

    Joined:
    Jul 31, 2017
    Messages:
    12
    Likes Received:
    2
    Gender:
    Male
    you could do that with the help of jQuery:
    $('a[href^="http"]').attr('rel','nofollow');
     
    • Thanks Thanks x 1
  4. Deadlysin

    Deadlysin Newbie

    Joined:
    Jul 23, 2014
    Messages:
    16
    Likes Received:
    2
    I don't think that will help. Most crawlers will not execute this JavaScript and read the tag as do follow.
     
    • Thanks Thanks x 1
  5. Rachmaninoff

    Rachmaninoff Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 19, 2011
    Messages:
    2,411
    Likes Received:
    721
    Location:
    404 Not Found
    If you're using wordpress, you can install External Links plugin to set all outgoing links as nofollow.
     
    • Thanks Thanks x 1
  6. SergeiVL

    SergeiVL Newbie

    Joined:
    Aug 17, 2017
    Messages:
    6
    Likes Received:
    1
    Gender:
    Male
    Hello.
    1) Download the program Notepad++.
    2) Open the template file of the header / footer.
    3) Click Ctrl+F -> tab Replace
    4) Use regular expressions. Do search / replace by expressions:

    Code:
    search: <a(.*?)</a>
    replace: <a ref="nofollow"$1</a>
     
    • Thanks Thanks x 1
  7. blackh4t

    blackh4t Regular Member

    Joined:
    Jan 30, 2009
    Messages:
    237
    Likes Received:
    78
    Location:
    #1
    • Thanks Thanks x 1