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

Help with NoFollow links

Discussion in 'Introductions' started by LilJohn187, May 15, 2017.

  1. LilJohn187

    LilJohn187 Newbie

    Joined:
    May 15, 2017
    Messages:
    25
    Likes Received:
    0
    Hey guys i need help with turning NoFollow links to index and follow. I use Yoast SEO for my ecommerce site and some links/pages on my website have been set automatically to Nofollow but i want them to be followed. any help will be greatly appreciated
     
  2. Nut-Nights

    Nut-Nights Jr. VIP Jr. VIP

    Joined:
    Jun 20, 2013
    Messages:
    5,058
    Likes Received:
    3,228
    Location:
    Hell
    Home Page:
    What kind of links ? Need more info.
     
  3. VOW Technology

    VOW Technology Newbie

    Joined:
    May 15, 2017
    Messages:
    17
    Likes Received:
    4
    Gender:
    Male
    Location:
    Jammu
    Home Page:
    1) You need to go to your coding and manually do the do follow to your links.
    2) You may set the rule by creating a function in the header section so all links will become do follow.
    3) You already have tried with YOAST SEO plugin (this should probably works)
    4) let me know of the full details of your website technology etc. so that i can provide you the solution.
     
    • Thanks Thanks x 1
  4. LilJohn187

    LilJohn187 Newbie

    Joined:
    May 15, 2017
    Messages:
    25
    Likes Received:
    0
    I am not much of a code. so be precise on how i can edit the code and also how do i set the rule in the header.php
    Below are the technologies used by the website
    Apache web server
    Google Analytics UA
    Google Font API
    HTTP/2
    PHP 5.6.30
    WooCommerce 3.0.6
    Wordpress 4.7.4
    Yoast SEO
    JQuerry
    Modernizr
    Twitter Emoji (Twemoji)
    PrettyPhoto
    thanks for the assistance VOW Tech
     
  5. LilJohn187

    LilJohn187 Newbie

    Joined:
    May 15, 2017
    Messages:
    25
    Likes Received:
    0

    Its weed dispensary. so some likes are not being followed, links like the one below

    a href links with" rel="nofollow"

    How to i fix this
     
  6. VOW Technology

    VOW Technology Newbie

    Joined:
    May 15, 2017
    Messages:
    17
    Likes Received:
    4
    Gender:
    Male
    Location:
    Jammu
    Home Page:
    Open your wordpress function.php file and type the following code in this file

    function strip_nofollow($text = '') {
    return preg_replace_callback("/<s*as+(.+?)>/is", 'strip_nofollow_callback', $text); }
    function strip_nofollow_callback($match) {
    $attr = $match[1];
    $attr = " $attr ";
    $attr = preg_replace("/
    s
    rels*=s*(['"])
    ([^1]*?s+)?
    nofollow
    (s+[^1]*?)?
    1
    /ix", " rel=$1$2$3$1", $attr);
    $attr = preg_replace("/
    s
    rels*=s*(['"])s*1
    /ix", '', $attr);
    $attr = trim($attr);
    return '<a ' . $attr . '>';
    } add_filter('the_content', 'strip_nofollow', 15);

    The above function does not make any changes in the core or in the wordpress database, it simply changes all the occurrence of no-follow tags into do-follow tags.
     
  7. LilJohn187

    LilJohn187 Newbie

    Joined:
    May 15, 2017
    Messages:
    25
    Likes Received:
    0
    Hey VOW Tech, I used the code like you said. I added it at the end of my functions.php file but it crashed the whole site.
    I restored the site with the backup i made.
    I don't know how to proceed from here
     
  8. VOW Technology

    VOW Technology Newbie

    Joined:
    May 15, 2017
    Messages:
    17
    Likes Received:
    4
    Gender:
    Male
    Location:
    Jammu
    Home Page:
    Can you please tell me the steps you followed while adding this code. If you are getting trouble while adding the same you may consider adding some plugins which are available free online.
     
  9. LilJohn187

    LilJohn187 Newbie

    Joined:
    May 15, 2017
    Messages:
    25
    Likes Received:
    0
    1) I copied the code you gave
    2) logged into my wordpress account
    3) Located Editor under Appearance
    4) from Editor i choose theme function (functions.php)
    5) I made a backup of the function.php file
    6) I added the code you gave me at the end of the functions.php
    7) I clicked save

    Those are the steps i followed, but it didn't work for me
    Honestly VOW, i appreciate you help
     
  10. WPninja

    WPninja Junior Member

    Joined:
    Apr 25, 2017
    Messages:
    123
    Likes Received:
    19
    Gender:
    Male
    Occupation:
    Creative WP Front-end Expert
    Location:
    Coding-Jungle
    No that, Make all links ******** makes your OBL higher which may affects on your ranking.
     
  11. LilJohn187

    LilJohn187 Newbie

    Joined:
    May 15, 2017
    Messages:
    25
    Likes Received:
    0
    Please can you explain further
     
  12. WPninja

    WPninja Junior Member

    Joined:
    Apr 25, 2017
    Messages:
    123
    Likes Received:
    19
    Gender:
    Male
    Occupation:
    Creative WP Front-end Expert
    Location:
    Coding-Jungle
    OBL means outbound links, in a simple term, a do-follow link to external website. Now what I mean, if your page or your site has too much OBL rather then internal links, then it seems as link farming or link selling websites to most of the search engines. Thus, the theme author generally creates a theme with some built in no-follow functions to external links to make them natural. :)
     
  13. LilJohn187

    LilJohn187 Newbie

    Joined:
    May 15, 2017
    Messages:
    25
    Likes Received:
    0
    so in actual sense, you mean i should reduce the amount of products i have on the website. is that so
     
  14. WPninja

    WPninja Junior Member

    Joined:
    Apr 25, 2017
    Messages:
    123
    Likes Received:
    19
    Gender:
    Male
    Occupation:
    Creative WP Front-end Expert
    Location:
    Coding-Jungle
    No, I don't suggest to reduce the products, just wanna remind a note that, when you add excessive links some other sites, just make sure, a no-follow tag inserted within the links. You can add 100 of external links, no limitation on that, but it'll not be a wise choice that 100 of those links has a do-follow attribute :)