How to Change Nofollow to Dofollow in WordPress?

How to Change Nofollow to Dofollow in WordPress?
The internet thrives on connections, and each hyperlink is like a bridge that guides users from one site to another. But not all bridges are created equal. If you use WordPress, you might’ve noticed that WordPress links are, by default, set to nofollow. Google doesn’t crawl nofollowed links. However, you can change that with a dofollow link.

A dofollow link allows search engines to pass link juice to the linked site. In contrast, a nofollow link has a little tag (rel=”nofollow”) that tells search engines to ignore a link for pagerank.

So why would someone want to change nofollow links to dofollow? For SEO purposes, of course! Dofollow links can boost a site’s authority and improve search rankings. If you’re running a blog, business, or any website, dofollow links can be a game-changer for visibility.

But before you start stripping away every nofollow tag, hold up. Some links should stay nofollow. Paid links, sponsored content, and user-generated comments often use nofollow to avoid spam and SEO penalties. So, changing every nofollow link to dofollow could backfire. This guide exists to help you make informed decisions about when and how to convert nofollow to dofollow in WordPress.

How to Identify Nofollow Links?

The main difference between dofollow and nofollow links is that the former passes link juice, and the latter doesn’t. Users don’t even notice this, but it’s huge for SEO. Here are three easy ways to check which links are nofollow:

1. Using Browser Inspection

Your browser’s Inspect Element tool gives you a behind-the-scenes look at a webpage’s HTML code. This is where you’ll find out whether a link is nofollow or dofollow.

Step 1: Open the Page You Want to Inspect

  • Go to the webpage where the link is located. This could be your own site, a competitor’s blog, or any page you’re analyzing.

Step 2: Right-click on the Link

  • Find the specific link you want to check. Then, right-click on it and select Inspect (or Inspect Element, depending on your browser).

Find the specific link you want to check. Then, right-click on it and select Inspect

Step 3: Locate the <a> Tag in the Code Panel

  • A panel will pop up, displaying the webpage’s HTML. Now, to clear up the confusion about the screenshot below, noopener, noreferrer, and nofollow work pretty well together. So, nofollow is often combined with the noopener attribute.

Locate the <a> Tag in the Code Panel

  • In the panel, you’ll see a line of code that starts with <a href=”URL”>. This <a> tag represents the hyperlink you clicked on. It may look something like this:
<a href=“https://example.com” rel=“nofollow”>Example Link</a>

Step 4: Look for the rel=”nofollow” Attribute

  • If you see rel=”nofollow”, this means Google won’t count the link for rankings.
  • If rel=”nofollow” isn’t there, it’s a dofollow link, meaning Google will follow and pass link juice.

Step 5: Use the Search Function for Faster Checks
If you’re inspecting a long page with many links, scrolling through the HTML can be a hassle. Instead, press:

  • Use Ctrl + F (Windows) or Cmd + F (Mac) to open the search bar.
  • Type “nofollow” and hit Enter to quickly find nofollow links on the page.

Methods to Change Nofollow to Dofollow

Who doesn’t love a good SEO hack? If you’re still paying attention, it’s because you’re looking for ways to turn those boring nofollow links into dofollow ones. Let’s dive in!

Manually Editing Links in Posts & Pages

If your WordPress links have rel=”nofollow”, chances are the search engines are ignoring them. By default, every WordPress link has a nofollow attribute slapped on. But the good news is you can remove it manually, and it’s pretty easy.

Now, let’s walk through the process step by step, depending on whether you’re using the Gutenberg Editor.

Removing Nofollow in Gutenberg Editor

Gutenberg is the default editor in WordPress, and while it tries to make everything drag-and-drop simple, it also loves hiding settings in weird places. If you’ve got a link with a rel=”nofollow” tag, here’s how to get rid of it.

  1. Open the Post or Page: Head over to your WordPress dashboard and click on Posts > All Posts (or Pages > All Pages) to find the content with the nofollow link. Hit Edit.
  2. Click on the Link: Find the offending hyperlink in your content and click on it. A small toolbar should appear above the text with a pencil/edit icon. Click it.
  3. Find the “Advanced” Settings: Now, this is where things get a little annoying. Instead of just giving you an obvious checkbox that says “Make this link dofollow”, WordPress tucks it away under “Advanced” settings (or the three dotsmenu).
  4. Remove nofollow: If you see a field labeled “Rel”, this is where nofollow is hiding. Just delete the word nofollow, but leave other attributes like noopener or noreferrer alone if they’re there. They’re security features that prevent weird stuff like tabnabbing (yes, that’s a thing).
  5. Update Your Post: Hit Update, refresh your page, and boom! Your link is now dofollow.

Pro Tip: If you don’t see the “Rel” field in the link settings, switch to Code Editor by clicking the three-dot menu in the top-right corner (Options > Code Editor). Then, manually delete rel=”nofollow” from the link’s HTML.

Removing Nofollow Using Plugins

Manually removing nofollow from links is fine if you only have a handful to fix. But if your site is littered with them, doing it one by one is a nightmare.

Luckily, there’s a faster way: plugins. A few WordPress plugins let you disable automatic nofollow settings, bulk-edit links, or even control which links are nofollow/dofollow without touching any code. Below, we’ll go over the easiest ones to use.

Yoast SEO

Yoast SEO is one of the most popular WordPress SEO plugins, but here’s the thing: It doesn’t automatically add nofollow, unless you tell it to. If you enabled a setting that’s putting rel=”nofollow” on every external link, you need to turn it off. To disable it:

  1. Go to your WordPress Dashboard and navigate to SEO > Search Appearance.
  2. Click on the “Content Types” Tab. This controls how Yoast handles links in your posts and pages.
  3. Look for the “Show Posts in Search Results” Section. If there’s an option that says something about nofollow links, make sure it’s turned OFF.
  4. Click Save Changes, refresh your site, and check your links again.

Rank Math SEO

Rank Math is another powerhouse SEO plugin. Unlike Yoast, it actually has a setting that can automatically nofollow all external links. It sounds good in theory but can backfire if you’re trying to get link juice.

If Rank Math has been forcing nofollow on your links, here’s how to fix it:

  1. WordPress Dashboard > Rank Math > General Settings
  2. Click on Links
  3. Find the “Nofollow External Links” Option
    • If enabled, Rank Math adds nofollow to every link that leads outside your site.
    • Turn it OFF to stop this from happening.
  4. Save Changes & Refresh Your Site

If you’re still seeing nofollow on some links after doing this, it’s probably because they already existed before you turned this setting off. You’ll have to edit those links manually or use a link management plugin. You can even use an SQL query to bulk-remove nofollow from every link on your site.

Removing Nofollow from WordPress Comments

If you’ve ever left a comment link on a WordPress site, you’ve probably noticed that the link was automatically tagged with rel=”nofollow”. This is not a mistake or a bug; it’s actually a built-in feature of WordPress designed to prevent spam.

So, why does WordPress add nofollow to comment links in the first place? Well, in the early days of the internet, comment sections became notorious for spammers who would leave links in comments just to boost their website’s SEO ranking.  WordPress handled this situation by introducing nofollow. This tag reduces the chances of spammers flooding your comment section with links.

Removing Nofollow from WordPress Comments
Screenshot via perfmatters.io

Even though this is a good feature for keeping spam in check, there are times when you might want to disable the nofollow tag. Many website owners do it when their site is community-driven. Whatever your reason, disabling the nofollow tag in WordPress comments can be done in just a few steps.

Disabling Auto-Nofollow in WordPress Comments via functions.php

The easiest way to remove the nofollow tag from links is by adding a small code to your site’s functions.php file. This method doesn’t require any plugins, and it gives you more control over your site. But, before we dive into the code, here is a quick word of caution: Always back up your site before making changes to the functions.php file. A simple mistake can mess with your site’s workflow.

Now, let’s get to the good stuff—how to remove the nofollow tag from comment links by modifying your functions.php file:

  • Access Your Theme’s functions.php File
    • Go to your WordPress dashboard.
    • From the sidebar, navigate to Appearance > Theme Editor.
    • Find and click on the functions.php file from the list on the right.
  • Add the Code Snippet
    Once you’re in the functions.php file, scroll to the bottom and paste the following code:
remove_filter(‘comment_author_url’, ‘no_filter_comment_author_url’);
  • Save the File:
    After pasting the code, click Update File to save your changes.
  • Test the Changes:
    Now that the snippet is in place, head to your WordPress site’s comment section and leave a test comment with a link. Once the comment is posted, check the link’s HTML by selecting Inspect. You should no longer see the rel=”nofollow” attribute attached to the comment link.

By the way, this snippet will only affect comment links. If you want to control whether certain links should be nofollow or not, you’d have to add more complex conditional logic to your functions file to give you even finer control.

Using SQL Query to Remove Nofollow from All Posts

If your website has hundreds or thousands of nofollow links spread across different posts, removing them manually or even through a plugin might not be practical. The fastest way to remove rel=”nofollow” from all links across your entire site is by running a SQL query directly in your WordPress database.

However, this method is for advanced users. One wrong command and you could mess up your entire site’s content. So, before you touch anything:

Warning: Backup Your Database!

Before running any SQL query, always create a full database backup. If something goes wrong, you’ll need a way to restore your data. You can back up your database using:

  • Your Hosting Provider’s Backup System
  • WordPress Backup Plugins
  • phpMyAdmin

How to Run an SQL Command to Remove Nofollow Site-Wide

If you’re comfortable working with phpMyAdmin (or any MySQL database tool), follow these steps to remove rel=”nofollow” from all your WordPress posts.

Step 1: Access phpMyAdmin

Log into your hosting account.

  • Navigate to cPanel > phpMyAdmin (or the equivalent database manager your host provides).
  • In phpMyAdmin, find your WordPress database from the list on the left.

If you’re not sure which database your WordPress site is using, check your wp-config.php file. Look for this line:

define(‘DB_NAME’, ‘your_database_name’);

Step 2: Run the SQL Query

Once you’re inside phpMyAdmin:

  • Click on the “SQL” tab at the top.
  • Copy and paste the following SQL query into the command box:
UPDATE wp_posts
SET post_content = REPLACE(post_content, ‘rel=”nofollow”‘, );
  • Click “Go” to execute the command. This query searches every post in your WordPress database for rel=”nofollow” and removes it. It only affects your posts/pages (wp_posts table), so your comments, menus, or widgets won’t be changed.

Step 3: Verify the Changes

After running the query, check a few of your posts to make sure rel=”nofollow” has been removed.

  • Open a post that previously had a nofollow link.
  • Right-click on the link and select Inspect.
  • If rel=”nofollow” is gone, congrats—it worked!
  • If something looks off, you can restore your backup and try again.

Although an SQL query is the fastest way to get the job done, don’t use it if you lack the technological know-how for databases. Stick to manual edits or a plugin-based approach. But if you want an instant fix, this method will save you hours of work.

Bottom Line

We’ve covered several ways to identify and modify nofollow links. Everything from using browser tools and SEO plugins to editing posts manually and running SQL queries for a bulk update. Each method has its own level of complexity. So, the best approach depends on how good your team is with database management.

But here’s the thing: nofollow links aren’t completely useless. They don’t directly pass PageRank, but they still diversify your link profile. Google no longer treats them as absolute barriers but rather as “hints,” meaning they still hold some SEO weight. A well-balanced link strategy includes both dofollow and nofollow links, and over-optimizing for one or the other can make your site look unnatural.

So, what’s the takeaway? Use dofollow links wisely, but don’t dismiss nofollow links either. They still have value, whether it’s for protecting your site from spam, linking to paid content, or simply maintaining a healthy link profile. The real trick is knowing when to make the switch and how to keep your SEO strategy balanced.

For more insights on SEO, WordPress, and content strategies that actually work, check out Algomindz.  We break down complex strategies into simple steps so you can focus on growing your business instead of getting lost in SEO jargon.

FAQs

Will changing nofollow to dofollow increase my domain authority?

Not directly, at least. Domain Authority is a metric developed by Moz, not Google, and it depends on the quality and quantity of inbound links to your site. Simply changing your outbound links from nofollow to dofollow won’t boost your DA, but earning high-quality dofollow backlinks from authoritative websites will.

Can I make all external links dofollow by default in WordPress?

Yes, but it’s not recommended. Take that with a grain of salt. See, some SEO plugins and custom scripts allow you to remove the nofollow attribute from external links, but Google expects you to nofollow certain links, such as paid or sponsored links.

Are there risks to making all links dofollow?

Pfft, obviously. If you allow spammy or irrelevant links to be dofollow, your site could lose credibility and be penalized by search engines. Google expects a natural mix of dofollow and nofollow links. So, if it detects excessive link manipulation, you’re in trouble.

Author

  • Algomindz

    Algomindz is a team of experts dedicated to boosting businesses' online presence through a strategic mix of Answer Engine Optimization (AEO) and SEO. We specialize in maximizing visibility across AI-driven platforms and search engines, helping top companies achieve their marketing goals. With data-driven strategies, ethical marketing, and tailored solutions, we drive sustainable growth, ensuring businesses stay ahead in the competitive digital landscape.

    View all posts
Tags

What to read next