1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

nofollow

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

Tags:
  1. adeniyi faith

    adeniyi faith Junior Member

    Joined:
    May 15, 2017
    Messages:
    187
    Likes Received:
    42
    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:
    18,600
    Likes Received:
    10,075
    Occupation:
    PROVIDING PROXIES FOR GSA SCRAPING.
    Location:
    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. LatteGrande

    LatteGrande Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 19, 2011
    Messages:
    2,198
    Likes Received:
    613
    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 Junior Member

    Joined:
    Jan 30, 2009
    Messages:
    160
    Likes Received:
    43
    • Thanks Thanks x 1