Cloak affiliate links to protect your affiliate data, make them more reader-friendly and improve SEO.
Note: Amazon Associates does not allow cloaking of their links. I have provided a link to their linking requirements below this post under References.
To cloak affiliate links simply means creating redirects of raw affiliate links. In addition, you can set your links so they are not followed by search engines and add a link prefix subfolder to be disallowed in robots.txt so that it is not indexed by search engines.
First, I am going to share some fundamental information about link cloaking and guidelines. Then I am going to show you 2 plugins you can use and how to setup the disallow command in your robots.txt file using Yoast.
You can also set the redirects manually, but I am not outlining that here. However, I have provided a link to an article by Yoast that will walk you through it at the bottom of this post under References.
Should You Disclose Affiliations?
Yes, you should be transparent about your affiliations when recommending products and services.
To cloak means to hide or conceal and there was a time on the Internet when this was the purpose of cloaking affiliate links.
However, times have changed and these days cloaking is used to make links pretty and easy to manage. The more transparent you are about your associations the better.
As a matter of fact, the FTC requires disclosure and bloggers can be fined for not providing it. I have provided a link about FTC guidelines below this post under References.
Why Should You Cloak Affiliate Links?
It can help prevent other marketers from easily obtaining your affiliate ID and switching yours out with theirs.
It provides a more reader-friendly link to include in your content. People are more likely to click on a clean link then an ugly number filled raw affiliate link that looks like it leads to a virus download.
It allows you to globally parse the links with a rel=”nofollow” tag which helps since search engines dislike affiliate links.
It allows you to globally update your links in the event of an affiliate ID or merchant change.
It allows you to track and manage your affiliate link clicks.
How Do You Cloak Affiliate Links?
Link shortening services like bit.ly and goo.gl are not sufficient for link cloaking on your website.
There are 3 steps to do it properly:
- Create redirects by either using a WordPress plugin or manual entry.
- Parse affiliate links with a rel=”nofollow” tag to discourage search engines from following the links.
- Modify your robots.txt file to disallow the subfolder where your affiliate links reside to discourage search engines from indexing them.
The easiest way to create redirects and manage affiliate links is by using a plugin.
Two plugins I have experience with that have free versions are ThirstyAffiliates and Pretty Link Lite.
Both plugins also have paid pro versions available for advanced options and tracking.
I prefer this plugin for my affiliate links because it provides a Link Prefix in the free version. The subfolder /recommends/, or whichever you choose, can then be set to disallow in the robots.txt file to prevent indexing by search engines.
Install and activate the plugin. Then, find Affiliate Links on the left side of your WordPress Dashboard menu and click Settings.
Choose your preferred Link Prefix, select the Link Redirect Type 307 (Temporary), check Use no follow on links, and check Open links in new window.
Create your affiliate link by entering the Affiliate Link Name (name of the vendor or product), then paste in the actual affiliate link under Destination URL. There is also the option to Attach Images.
Once you have entered and saved the information, look for it on the left side of your WordPress Dashboard menu under Affiliate Links → All Affiliate Links.
You can then add the cloaked link to your posts using the editor at the top of the formatting menu. You can also create new links within the editor.
Pretty Link is the favorite of guru Internet marketers because it provides universal link shortening and cloaking and excellent tracking tools in the pro version.
Unfortunately, the free version, Pretty Link Lite does not provide a link prefix for an affiliate subfolder to disallow in robots.txt.
I use Pretty Link Lite for 301 (Permanent) redirects and general link shortening, but not for my affiliate links. In the future, I may purchase Pretty Link Pro and migrate my affiliate links.
You might choose wisely to go ahead and purchase Pretty Link Pro (yep, that is an affiliate link!) now so you are set up under one application from the start.
Having said that, some people use Pretty Link Lite for their affiliate links just as it is and choose not to fool with subfolders and robots.txt files. You can spend days on the Internet reading differing opinions about affiliate links and SEO.
To cloak affiliate links in Pretty Link Lite choose Redirection Type 307 (Temporary), paste in your Target URL, add your Title, check Nofollow this Link under SEO Options, and check Track Hits on this Link under Tracking Options.
For a detailed how-to on setting up Pretty Link Pro, read Rae Hoffman’s post How to Cloak Affiliate Links (& Why You Should) and be sure to subscribe to her awesome newsletter Sound Bites while you are there.
Disallow Search Engines from Crawling Your Affiliate Links
For Yoast SEO users, find SEO on the left sidebar of your WordPress Dashboard. If you do not already have a robots.txt file, you will have the option to create one. Do not directly edit your htaccess file.
SEO → Tools → File Editor
Add the following directive to it (replacing /subfolder/ with your correct link prefix subfolder name):
Note: The subfolder designation is case sensitive. /subfolder/ and /Subfolder/ are different designations. So be sure to use the correct case when you type it in.
Now the search engines will be discouraged from crawling or indexing that folder.
At a minimum, you should cloak your affiliate links to create nicer looking links and set them to Nofollow. Also, your outbound links should be set to open in a new window.
Thank you for reading How to Cloak Affiliate Links. Do you have a helpful tip or question? Please leave it below. I would love to hear from you!