{"id":15813,"date":"2026-02-06T06:25:39","date_gmt":"2026-02-06T06:25:39","guid":{"rendered":"https:\/\/www.copebusiness.com\/?p=15813"},"modified":"2026-02-07T10:21:43","modified_gmt":"2026-02-07T10:21:43","slug":"add-nofollow-external-links-wordpress","status":"publish","type":"post","link":"https:\/\/www.copebusiness.com\/de\/seo\/add-nofollow-extern-links-wordpress\/","title":{"rendered":"How to Add Nofollow External Links in WordPress (Easy Guide)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Adding rel=&#8220;nofollow&#8220; to external links in WordPress is a common SEO practice that tells search engines not to pass link equity (PageRank) to the linked site. This is useful for untrusted links, affiliate links, sponsored content, user-generated comments, or any external link you don\u2019t want to endorse fully. With Google\u2019s continued focus on link quality and E-E-A-T (Experience, Expertise, Authoritativeness, Trustworthiness), properly managing external links helps maintain your site\u2019s authority while protecting against potential SEO penalties.<br><br>At Cope Business, we implement nofollow strategies for clients during our <a href=\"https:\/\/www.copebusiness.com\/technical-seo-services\/technical-seo-audit-service\/\" target=\"_blank\" rel=\"noreferrer noopener\">technical SEO audit services<\/a> to ensure safe linking practices without manual effort on every post.<br><br>This guide shows you three easy ways to automatically add rel=&#8220;nofollow&#8220; to external links in WordPress \u2014 using plugins (recommended), code snippets, and built-in options.<\/p><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">On this page<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #0a0a0a;color:#0a0a0a\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #0a0a0a;color:#0a0a0a\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.copebusiness.com\/de\/seo\/add-nofollow-extern-links-wordpress\/#Why_Add_Nofollow_to_External_Links\" >Why Add Nofollow to External Links?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.copebusiness.com\/de\/seo\/add-nofollow-extern-links-wordpress\/#Method_1_Using_a_Plugin_Easiest_Recommended\" >Method 1: Using a Plugin (Easiest &amp; Recommended)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.copebusiness.com\/de\/seo\/add-nofollow-extern-links-wordpress\/#Method_2_Using_Custom_Code_Lightweight_%E2%80%93_No_Plugin\" >Method 2: Using Custom Code (Lightweight \u2013 No Plugin)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.copebusiness.com\/de\/seo\/add-nofollow-extern-links-wordpress\/#Method_3_Manual_Nofollow_For_Specific_Links_Only\" >Method 3: Manual Nofollow (For Specific Links Only)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.copebusiness.com\/de\/seo\/add-nofollow-extern-links-wordpress\/#Best_Practices_for_Nofollow\" >Best Practices for Nofollow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.copebusiness.com\/de\/seo\/add-nofollow-extern-links-wordpress\/#Final_Thoughts\" >Final Thoughts<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Add_Nofollow_to_External_Links\"><\/span>Why Add Nofollow to External Links?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Preserve Link Juice<\/strong> \u2014 Keep authority on your own site<\/li>\n\n\n\n<li><strong>Avoid SEO Risk<\/strong> \u2014 Prevent passing value to low-quality or spammy sites<\/li>\n\n\n\n<li><strong>Affiliate &amp; Sponsored Compliance<\/strong> \u2014 Many affiliate programs require nofollow<\/li>\n\n\n\n<li><strong>Comment Spam Protection<\/strong> \u2014 Stop spammers from gaining backlinks<\/li>\n\n\n\n<li><strong>Control Crawl Budget<\/strong> \u2014 Encourage Google to focus on your internal pages<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note<\/strong>: Google says nofollow is now a \u201chint\u201d (not a directive) since 2020 \u2014 but it still reduces link value and helps with spam control.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_1_Using_a_Plugin_Easiest_Recommended\"><\/span>Method 1: Using a Plugin (Easiest &amp; Recommended)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Plugins automate nofollow on all external links \u2014 no manual work needed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Recommended Plugin: External Links (Free) or All in One SEO (Free\/Pro)<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Using External Links Plugin (Free &amp; Simple)<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Install <strong>External Links<\/strong> from <strong>Plugins &gt; Add New<\/strong>.<\/li>\n\n\n\n<li>Activate \u2192 Go to <strong>Settings &gt; External Links<\/strong>.<\/li>\n\n\n\n<li>Enable options:\n<ul class=\"wp-block-list\">\n<li><strong>Open in new tab\/window<\/strong> (recommended)<\/li>\n\n\n\n<li><strong>Add nofollow<\/strong> (main feature)<\/li>\n\n\n\n<li><strong>Add sponsored<\/strong> (for affiliate\/sponsored links)<\/li>\n\n\n\n<li><strong>Add noreferrer<\/strong> (extra privacy)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Choose where to apply:\n<ul class=\"wp-block-list\">\n<li>Posts &amp; Pages<\/li>\n\n\n\n<li>Comments<\/li>\n\n\n\n<li>Widgets<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Exclude domains (optional): Add your own site or trusted partners.<\/li>\n\n\n\n<li>Save Changes \u2014 all external links now have rel=&#8220;nofollow&#8220; (or sponsored).<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Alternative Plugin<\/strong>: <strong>All in One SEO<\/strong> (free version)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Go to <strong>All in One SEO &gt; Search Appearance &gt; Advanced<\/strong> \u2192 Enable \u201cNofollow external links\u201d toggle.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros<\/strong>: Automatic, safe, reversible, works site-wide.<br><strong>Cons<\/strong>: Adds one lightweight plugin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_2_Using_Custom_Code_Lightweight_%E2%80%93_No_Plugin\"><\/span>Method 2: Using Custom Code (Lightweight \u2013 No Plugin)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For full control without extra plugins.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Steps<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install <strong>WPCode<\/strong> (free) from <strong>Plugins &gt; Add New<\/strong> \u2014 safest way to add code.<\/li>\n\n\n\n<li>Go to <strong>Code Snippets &gt; Add Snippet<\/strong> \u2192 Create new snippet titled \u201cAuto Nofollow External Links\u201d.<\/li>\n\n\n\n<li>Set to run \u201cEverywhere\u201d or \u201cFrontend Only\u201d.<\/li>\n\n\n\n<li>Paste this PHP code:<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>PHP<code>function cope_nofollow_external_links($content) { $content = preg_replace_callback( '\/&lt;a(&#91;^&gt;]+)href=&#91;\"\\'](&#91;^\"\\']+)&#91;\"\\'](&#91;^&gt;]*)&gt;\/i', function($match) { $url = $match&#91;2]; $current_host = parse_url(home_url(), PHP_URL_HOST); $link_host = parse_url($url, PHP_URL_HOST); <em>\/\/ Skip internal links and empty URLs<\/em> if (!$link_host || $link_host === $current_host) { return $match&#91;0]; } <em>\/\/ Add nofollow (and optionally noreferrer, sponsored)<\/em> $rel = 'nofollow'; if (strpos($match&#91;1], 'rel=') !== false) { <em>\/\/ If rel already exists, append<\/em> $match&#91;1] = preg_replace('\/rel=&#91;\"\\'](.*?)&#91;\"\\']\/i', 'rel=\"$1 nofollow\"', $match&#91;1]); } else { $match&#91;1] .= ' rel=\"nofollow\"'; } return '&lt;a' . $match&#91;1] . ' href=\"' . $match&#91;2] . '\"' . $match&#91;3] . '&gt;'; }, $content ); return $content; } add_filter('the_content', 'cope_nofollow_external_links'); add_filter('comment_text', 'cope_nofollow_external_links');<\/code><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save &amp; Activate \u2192 All external links in posts and comments now have rel=&#8220;nofollow&#8220;.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros<\/strong>: No plugin bloat, fully customizable.<br><strong>Cons<\/strong>: Requires testing; may need tweaks for edge cases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Method_3_Manual_Nofollow_For_Specific_Links_Only\"><\/span>Method 3: Manual Nofollow (For Specific Links Only)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For occasional use:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Edit post\/page \u2192 Switch to <strong>Text\/HTML<\/strong> view (or Code Editor block).<\/li>\n\n\n\n<li>Add rel=&#8220;nofollow&#8220; manually to any external link:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>HTML<code>&lt;a<em> href<\/em>=\"https:\/\/example.com\"<em> rel<\/em>=\"nofollow\"&gt;External Link&lt;\/a&gt;<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>HTML<code>&lt;a<em> href<\/em>=\"https:\/\/example.com\"<em> rel<\/em>=\"nofollow sponsored\"&gt;Sponsored Link&lt;\/a&gt;<\/code><\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Pros<\/strong>: Precise control.<br><strong>Cons<\/strong>: Manual \u2014 not scalable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Best_Practices_for_Nofollow\"><\/span>Best Practices for Nofollow<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Use Sponsored for Affiliates<\/strong> \u2014 Google requires rel=&#8220;sponsored&#8220; for paid links<\/li>\n\n\n\n<li><strong>Don\u2019t Nofollow Internal Links<\/strong> \u2014 Keep internal links dofollow<\/li>\n\n\n\n<li><strong>Exclude Trusted Sites<\/strong> \u2014 Add exceptions for partners (e.g., Google, trusted sources)<\/li>\n\n\n\n<li><strong>Performance<\/strong> \u2014 Nofollow has no speed impact \u2014 pair with caching<\/li>\n\n\n\n<li><strong>SEO<\/strong> \u2014 Nofollow doesn\u2019t hurt your site; it just doesn\u2019t pass authority<\/li>\n\n\n\n<li><strong>Test<\/strong> \u2014 Use browser dev tools (F12 \u2192 Elements) to verify rel=&#8220;nofollow&#8220; is added<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span>Final Thoughts<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Adding nofollow to external links in WordPress is a quick SEO and trust improvement. Use <strong>External Links<\/strong> plugin for automatic site-wide control or code for a lightweight solution \u2014 both take minutes and give you peace of mind.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Smart linking protects your authority and keeps your site safe.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Need help setting up nofollow rules, optimizing your link strategy, or improving overall SEO? <a href=\"https:\/\/www.copebusiness.com\/contact\/\" target=\"_blank\" rel=\"noreferrer noopener\">Contact Cope Business<\/a> for a free technical SEO consultation \u2014 we\u2019ll review your site and implement the best linking practices for your goals.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding rel=&ldquo;nofollow&ldquo; to external links in WordPress is a common SEO practice that tells search engines not to pass link [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":15814,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[155],"tags":[],"class_list":["post-15813","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-seo"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/posts\/15813","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/comments?post=15813"}],"version-history":[{"count":3,"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/posts\/15813\/revisions"}],"predecessor-version":[{"id":15969,"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/posts\/15813\/revisions\/15969"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/media\/15814"}],"wp:attachment":[{"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/media?parent=15813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/categories?post=15813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.copebusiness.com\/de\/wp-json\/wp\/v2\/tags?post=15813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}