Google recently updates the algorithm it uses to rank web sites. One possible solution for this is to add the “nofollow” attribute to all paid or affiliate links on your web site. If you’re using WordPress there’s an easy way and a hard way to do this. I’ll show you both below.
In theory, the change is good news for honest web publishers and readers alike, since the stated goal of the project is to filter out paid links and “content farms” with high quantity, low quality articles.
Unfortunately a number of web sites got caught in the cross fire, despite publishing gobs of original content and staying away from paid links. It looks like there might be a relatively simple explanation for this: affiliate links.
There’s a difference between a web site trying to game Google’s search results by purchasing paid links on web sites and bloggers posting a little affiliate code when linking to a product on Amazon or another web site — especially if it’s a link they probably would have posted anyway. After all, why not earn a small commission when someone clicks your link to Amazon and makes a purchase if you were writing an article explaining that a new laptop is available or deeply discounted from the web store anyway?
The problem is that Google’s algorithm isn’t really able to tell the difference between these two types of links — not without a little help. That’s where the “nofollow” attribute comes in. Basically, by adding rel=”nofollow” to a link, you’re telling Google to ignore a link when making decisions regarding search results ranking.
In other words, one of the things Google looks for when determining which sites are the most trusted is the number of links to that web site from other web sites. If thousands of sites link to Amazon.com, then Amazon must be a relatively well trusted site. But if your web site is filled with links to Amazon and most of those links include affiliate code, Google might get the idea that you’re being paid to promote Amazon and you’re linking to the site for that reason, rather than because you trust it. Google might also decide that since you take money to post links, your site might not be all that trustworthy, and you can wave goodbye to traffic from Google.
By adding the nofollow attribute to any paid or affiliate links, you’re telling Google to just go ahead and ignore those links, which means you’re not being paid to goose anybody’s search engine traffic.
How to add the nofollow attribute manually
To add a nofollow attribute, you’ll want to take a look at the HTML view for your web site. Odds are your links will look something like this:
In order to add the nofollow, just insert rel=”nofollow” so that the link now looks like this:
Seems easy enough, right? It is… if you only want to do this on all new links. But things get a lot more complicated if you already have hundreds, or even thousands of links that Google may be counting against you.
You could try to find each post on your site with affiliate links and edit them one by one, but there is an easier way.
How to add nofollow links to every WordPress post in a category using [de77] No-Follower
There’s a free plugin for WordPress called [de77] No-Follower which lets you add a nofollow attribute to every link in every article in a certain category.
All you have to do is install the plugin, then go to the No Follower plugin settings, choose a category, and hit “save changes”
What I did was set up a new category in WordPress called “nofollow.” You can do this by clicking the Posts menu, then the Category submenu and then simply filling out the add new category box.
Editing links this way is actually a good idea because most WordPress plugins you use to perform a batch job only work so long as the plugin is installed and functioning properly. But it could take weeks to identify and manually edit every link on the site, so I figured there had to be an easier way. I was right.
Putting it all together – Searching for affiliate links and adding “nofollow” attributes in batch edits
OK, so if you have hundreds of articles with affiliate links, it might be tricky finding them all. I had a head start because I’ve been running a series called “Deals of the Day” for the past few years, and every post was tagged “bargains,” which made those posts easy to find. But it turns out there were hundreds of posts with affiliate links that weren’t in the daily bargains articles. So here’s the system I came up with to find and edit all affiliate links as quickly as possible.
First you’ll want to identify words that show up regularly in your affiliate links. For instance, most of my Amazon affiliate links include “bradlindsdigi-20” in the URL. If you performed a search for that term in Google you wouldn’t get very many results. But using my internal WordPress search, hundreds of articles showed up. If you use Commission Junction, LinkShare, or other popular affiliate networks you can do the same thing by searching for your publisher ID. Most LinkShare URLs, for instance, include the word “linksynergy.”
You can also manually search for the names of stores you know you sometimes link to. Note that sites such as J&R and B&H are easiest to search for in WordPress if you change the ampersand so that instead you search for B&H and J&R.
Once you have [de77] No-Follower installed and have a list of affiliate link terms to search for, it’s time to get started.
- From the WordPress admin menu, select Posts.
- Enter your first search term in the search box and then hit “Search Posts.”
- You’re now looking at a page that should contain posts with your affiliate link code. You might want to double check a few posts to make sure though.
- By default, WordPress will probably display 20 results. If you want to increase the results listed on each page, hit the “Screen Options” button near the top right side of the screen and change the number of posts. You probably won’t want to set the number too high or you might run out of memory, but 30 or 40 should be safe.
- Click the box next to “Date” to select every article shown on the page.
- From the “Bulk Actions” drop-down box, choose “Edit” and then hit the “Apply” button.
- You should see a list of posts to be edited and a number of options — but the only one we care about right now is the category.
- Check the box next to the category you want to add. In my case, I chose “nofollow.”
- Click the blue “update button.”
- It will take a moment for the page to refresh since you just asked WordPress to process 20 or more posts at once.
- When it’s done you should see a yellow bar with a message letting you know the posts have been updated.
- If there are more than 20 posts, you should see navigation menus near the top right letting you move to the next page.
- Repeat as necessary.