External Nofollow WordPress Plugin

nofollow External Nofollow WordPress Plugin

External Nofollow is a WordPress SEO plugin which automatically add HTML attribute rel="nofollow" to all external links in post content.

Nofollow is used to instruct some search engines that a hyperlink should not influence the link target’s ranking in the search engine’s index. Using nofollow, we can control the flow of PageRank from our website to another.

Download External Nofollow WordPress Plugin

Download the latest version from WP.org







Installation and Usage

  • Unzip downloaded file and upload extracted folder to the /wp-content/plugins/ directory
  • Activate the plugin through the ‘Plugins’ menu in WordPress and enjoy.

The plugin does its job automatically. It will check each link in the post content, if the link begins with blog URL, then it’s passed; otherwise, the attribute rel="nofollow" will be added.

You don’t need to do anything. Just install and forget!

Thanks

The plugin is improved from the code in the article WordPress Tip: Add nofollow to links in post content. I want to give big thank to WPExplorer, who encourage me to create this plugin.

16 Comments

  1. How to exclude some posts from no-follow.
    Can you please give some tip for this.

    Regards.

    Reply
    • Hi, I discontinue developing this plugin. Instead, you can use the SEO Smart Links plugin, which has same functionality.

      Reply
  2. Ideally I’d like a plugin to nofollow all links to chosen domains. In other words, if, say, I have Amazon links on my blog, I could simply enter the domain in a box and that would then make all links to Amazon nofollow.

    Reply
  3. I downloaded it but cannot see it working – where do I need to look exactly?
    Thanks
    David

    Reply
    • This plugin works silently, e.g. just install and forget! To check, view source code of your post, and check for external link.

      Reply
  4. How can I check if it worked.? Is there anyway I can see if the nofollow has been added?

    Reply
  5. it would be great i you can explain more the usage og my_nofollow() ,

    Reply
  6. Ok, i’ve found how to do this: open the php file

    (/external-nofollow.php) and search for the line

    $site_link = get_bloginfo(‘url’); in the callback function

    right after it add this line:

    if ( $_SERVER[“REQUEST_URI”] != ‘/archive/car-insurance-the-one-thing-car-addicts-cannot-overlook’)

    where /archive etc should be the url of your article.

    Reply
    • It would be nice to have an admin tool to add URLs you want to exclude from the “nofollow” plugin.

      My Workaround:
      If you want to exclude some external links from the “nofollow” function. You have to build this if-else around it. You have to change “domain.com, domain2.com, domain3.com” to the domains you want to exclude from the rule.
      Enjoy

      function callback($matches)
      {
      $link = $matches[0];
      $site_link = get_bloginfo(‘url’);

      if (preg_match(“/domain.com/i”, $link) || preg_match(“/domain2.com/i”, $link) || preg_match(“/domain3.com/i”, $link)){
      }else{
      if (strpos($link, ‘rel’) === false) {
      $link = preg_replace(“%(href=\S(?!$site_link))%i”, ‘rel=”nofollow” $1′, $link);
      } elseif (preg_match(“%href=\S(?!$site_link)%i”, $link)) {
      $link = preg_replace(‘/rel=\S(?!nofollow)\S*/i’, ‘rel=”nofollow”‘, $link);
      }
      }

      return $link;
      }

      Reply
  7. Hi, and thank you for this amazing plugin. I’ve searched a while till i found this one. Still, I do have a problem with it, let’s suppose I want to keep dofollow for one particular article.

    Could you consider adding a checkbox or something at the end of each article (admin post screen) so I may add dofollow for one of my clients?

    Eventually, could you please respond on how I may add this in the plugin php file? It should be a simple rule of: if this link then do follow, else default.

    Thank you

    Reply

Leave a Reply