Skip to main content
WordPress made easy with the drag & drop Total WordPress Theme!Learn More

How To Automatically Nofollow External Links In WordPress

Last updated on:

Adding a rel=”nofollow” tag to external links present in your site ensures that the search engine indexing your site (such as Google or Bing) does not follow those links and associate them with your site’s rankings. However, Matt Cutts says that we shouldn’t be worrying too much about which links to follow or ‘nofollow’ as Google’s search ranking algorithms are changing everyday and the old school methods of ‘fooling’ a search engine are long gone. Folks into SEO will know what I’m talking about, especially after the whole Google Panda 2.0 update fiasco.

A bit about Link Building and SEO

Link building is one of the oldest and best practices in search engine optimization. When a website contains your site’s link (i.e. links to your site), in terms of search engine score, it’s a plus point for your site. The generic term you’re probably looking for is ‘backlink’.
Get a backlink from an educational (such as a university – .edu) or a government (.gov) institution, you secure the maximum possible points. However, all backlinks you get must be from sites relevant to your website’s niche or topic in general.

You might think “Hey let’s create a site where people exchange links – that’s plus points for all the sites in the network!”

Google is not stupid. In fact, Google penalizes the site/domain running such link exchange hubs and all participating websites.

On to “nofollowing” External Links in WordPress

Webmasters have a practice of ‘nofollowing’ all external links present in their site (especially the links to a competing site), save a few. Whether nofollowing a link is good for SEO or bad is a whole different and largely debatable issue altogether.

In this tutorial we’ll show you how to automatically nofollow all external links in your posts or pages using a simple plugin – External Links.

  • First off, install and activate the External Links WordPress plugin
  • Next, head over to its (the plugin’s) settings from Settings >> External Links
  • You could choose your settings accordingly. Below is a snapshot of my settings:

External Links Settings

Once I apply my settings, the changes are visibly in every blog post and page. Here’s the code displayed by Google Chrome’s website inspector tool.

Result

Notice how the internal links are not given a “rel=nofollow” tag. Not following your internal links is a very bad idea – Google loves a strongly interlinked website.

If you decide to apply icons to external links, then this is how your posts would look like:

External Link with Icon

For your reference, the ‘online store’ is an internal link.

Download External Links

Wrapping Things Up

We tested External Links as well as Nofollow for External Link in WordPress 3.6.1 and found that the latter is a (comparatively) simpler plugin which adds rel=”nofollow” tags to all external links and target=”_blank” to all links in your site and does not have a settings page. If you’re looking for something barebone simple, you could consider this. What plugins and/or code snippets do you use to nofollow external links in your site?

Important: Some users have reported the External Link plugin causing large speed issues on your site. So if you use the plugin and find that your site is now running really slow it could be the issue.

nofollow-external-links-wordpress
Article by Sourav WPExplorer.com guest author
Subscribe to the Newsletter

Get our latest news, tutorials, guides, tips & deals delivered to your inbox.

41 Comments

  1. North Lake Web Solutions

    Your post raises two interesting issues. Do we want to nofollow external links, and do we want external links to open in a new window (or tab, depending on browser settings).

    If links are added using the button in WP’s kitchen sink, then a check box allows us to have the link open in a new window. In an ideal world, there would be another box to specify nofollow. The plugins you are recommending here don’t seem to offer than level of flexibility – the settings are too broad.

    I believe that Google is looking at who we link to almost as closely as who links to us. If all your external links are nofollow, that raises a distinct trust issue. My tendency, notwithstanding all the arguments about bleeding off page rank to other sites, is to leave links to high-quality (and relevant) sites as do follow. That is my way of telling Google that my sites belong in a nice neighborhood! This is especially true when I want to support someone else’s work. For example, the homepage of the site in the name field for this comment contains a do-follow link to the Electronic Frontier Foundation; this is one small way of supporting their important work.

    On the issue of opening links in new windows, there is another reason to do this: time on site. If your readers leave your site through an external link, and your site does not remain open in one window or tab, then Google sees them “voting with their feet” and than can reflect negatively on your quality rating.

    • AJ Clarke | WPExplorer

      Personally I only use nofollow for affiliate links otherwise it is dofollow, if I’m going to put a link on my site its going to be something I recommend/like and therefore it shouldn’t be nofollow. I wouldn’t use this plugin myself on WPExplorer (I would on other sites though).

      The important thing to remember is that not every site is the same. In some situations…maybe a single landing page where all links are affiliate or a site where all outbound links are downloads you might want all the links to be nofollow. Also, remember that the plugin only changes links in the post content. You can always have external links elsewhere.

      Adding nofollow to all links is definitely not something for everyone and it’s something I wouldn’t recommend a blogger, but in some cases it can be very useful.

      Thanks for your insight!

  2. Shristy Chandran

    If at all one needs to add no follow, i always prefer the coding into the theme files rather than a plugin, as these plugins keep adding the nofollow attribute on each pageload, am i right ?

    • AJ Clarke | WPExplorer

      If you are using WordPress you really should be caching the front-end anyway, so it wouldn’t matter if it’s being added via a plugin (php) if its cached 😉 We personally use WPEngine which has caching already built-in but you can use a plugin like W3 Total Cache.

  3. Jennie

    I just added this and followed your instructions, but I am not seeing the no follow code in my posts??

    • AJ Clarke | WPExplorer

      Maybe try clearing your cache?

  4. Web Hosting Magazine

    Hello,

    I tried External Links, it is a good plugin but make your site very slow. Check queries for page load time or check your blog with P3 Profiler, and you discovered how External Links affect the performance of WordPress.

    Speed and performance, remain for me always the first point. Probably, is better use a modification in the footer.php to apply automatically the “no follow” at all external links.

    Regards!

    • AJ Clarke

      Thanks for the heads up!

  5. Jean-Luc

    Hi,

    I installed the External Links plugin. It works, but what if I want to define a specific link as “dofollow” ?

    I tried to add rel=”dofollow” in WordPress post editor, and Google Chrome Inspector shows something strange : rel=”dofollow nofollow”. What’s going to happen in this case ?

    Thanks
    Jean-Luc / Total Theme user

    • AJ Clarke

      Hi Jean-Luc,

      I think this plugin is best suited for people that literally just have an affiliate site where they don’t want to link out to anyone. If you add it to a more “standard” site it might cause your site to slow down a bit.

      Personally, I don’t even believe in dofollow (for the most part)! I think you should ONLY link to other sites that you truly trust and want to link to. No-follows should be reserved only for affiliate links.

      That said, you can add rel=”follow” to override, have a look at bullet #3 on the plugin landing page on WP.org.

  6. kcoitk

    Hi, This question may be not related to this post but I am very curious to know how you made these links yourdomain.com/out/xyz to the your preferred location without showing the actual link?

    • AJ Clarke

      I use the Pretty Link Pro plugin – it’s awesome 😉 The light version (free) is actually really good, so maybe start there.

  7. keta sikharulidze

    Nice tweak buddy. I guess after adding this snippet, we will need to add re=”dofollow” within the link to give away dofollow links. Isn’t it?

    • Sourav K

      Yes, that’s right.

      • Atish Ranjan

        But Does rel=”dofollow” even exist? I read about it a lot over Google and found that this tag doesn’t even exist. but yes when you add it then neither the post will show dofollow nor nofollow. check with MOZ toolbar for dofollow and nofollow after adding it.

        • AJ Clarke

          dofollow is basically a useless tag, you can use it but I don’t think it does anything.

          • Atish

            Google sent me link penalty for one of my blog where I added nofollow plugin but few of links which I have to give dofollow so I added rel=”dofollow” and I thought its just to show that its dofllow but its nofollow actually but when Google sent an examply while replying to my reconsideration then they pointed out a link with which I added rel=”dofollow” which means they are taking it in account

            Moreover I have external nofollow plugins installed.

            Google is too bad now a days

  8. nanuka shvangiradze

    The problem with my blog is that links are not getting “nofollow”ed even though I use rel=”nofollow” tag. Example: I use the rel=”nofollow” but it doesn’t get displayed in the page source for a particular link. I put up this problem on the support forum. I was told that it might be due to a str_replace missing. My problem wasn’t clarified. Please help me regarding this.

    • Sourav K

      Hi Nanika,
      Sorry I’m afraid I won’t be able to help you with this. Could you try manually adding the rel=nofollow tag in your links?

  9. Imran Murtaza

    Nice Plugin. Thanks for sharing.

  10. jeburke

    will this deter spammers from wanting to post on my blogs?

    • AJ Clarke

      Not really. For that you’ll want to either add a captcha to your comment field or use a 3rd party plugin for your comments such as Disqus or JetPack (what we use).

  11. pnisbet

    According to Google, ‘nofollow’ takes precedence over ‘follow’ or ‘dofollow’. Matt Cutts says if you have a blanket meta tag with nofollow for the page, then you cannot override this by adding rel=”follow” to individual links.

    How does WordPress overcome this?

  12. WPDIV

    Is there any trick to set nofollow for all external links by using functions.php code?

  13. Amita Johnsy

    Great post. That’s what i was looking for my blog at adsolist*com. I discovered this thing 2 years after launching my site and noticed a drop in search engine traffic. Actually, i have hundreds of outbound links in this blog and they all were Dofollow. This was certainly not good at all ! Thanks for the easy solution.

  14. rraju008

    Nice post , I have created another simply solution for that – https://github.com/rraju007/Wordpress-Nofollow-Master

  15. rajdeep das

    Dofollow Link is a hyperlink that is able to tell all search engines to pass along it’s page rank influence to an outbound link. If you will use or get do follow links then search engines will count your link in the eyes of Google, yahoo, Bing etc as backlink for your site and you can get some positive value for your site ranking.

    Nofollow is html tag that website owners, add to links in their website for the search engines not to crawl, notice, or acknowledge a link.

  16. renee

    HI there, I don’t have this app installed but when I did a SEM rush analysis on my site it came up with a warning that a I have 310 no follow links on my website, and it appears my internal links are marked as nofollow for some reason and I am not sure why… Any ideas on what could be causing this?

    • AJ Clarke

      This could be because of your theme itself. Have you tried switching themes to check? If you aren’t a developer and are not able to check your source code to see where these nofollow links may be coming from I suggest you consider hiring a freelancer for some assistance. If it’s not being added by a plugin, my only guess is it is being added by the theme or that the SEM analysis tool has a bug, have you tested with another tool?

  17. bhumishah

    Thanks for the article. Useful to me.

  18. Shaun

    Thanks so much WpExplorer for this helpful article. This is what I was looking for. You solved my problem. Thank you so much for sharing this.

  19. kumar sunil

    Hi,
    The links are very much important for any blog to have, whether you will talk about the inbound link or the outbound links. This is a good piece of information to share with the others.

    Thanks for sharing a quality.
    kumar

  20. arsh1219320

    oh man !! i don’t have words to say that you have helped me a lot! thank you God bless you 😀

  21. Munna Bhai

    Thanks admin for helping me out from great trouble because i know that google does want instruction about Nofollow or Dofollow

  22. atul

    thanks admin

  23. bhupendra01

    hello i have question i am using wordpress for one of my project. i have not included any plugin for nofollow external link. but when i create a post then i see it creates a nofollow links for external links on the post..why can anyone help me?

    • AJ Clarke

      Maybe check with the theme developer for the theme you are using incase the theme has some code in it for that or ask your webhost for assistance. Since this isn’t normal behavior there isn’t anyway for us to know why it’s happening 🙁

  24. Javier Gomez

    Thanks for the information, just what I was looking for.

    regards

    Excuse me for my bad english

  25. Lawal Rahman

    Thanks for this guide. Please I want to know if I can use the Nofollow setting in RankMath SEO plugin since the plugin can handle that instead of installing the External Links WordPress plugin recommended by you?

    • Kyla

      Unfortunately I’m not familiar with the RankMath plugin so this is something you’ll need to ask the developers about. If it works, let me know so I can include it in our list of suggestions. Thanks!

  26. Roshni Kargi

    Thanks Sourav for this post. As per SEO standards I have never marked any outgoing links as NoFollow. But overtime, I find that the authority of my website is decreasing. The DA used to be 30 and now its come down to 22. Most of the stuff SEO gurus talk about is just to create a fear factor in the minds of SEO, is what I understand. Your post has helped me find a great plugin and now I have installed it on my website to save the LinkJuice :-))

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how your comment data is processed by viewing our privacy policy here.