How to Cloak Affiliate Links (&...

Affiliate Link Cloaking Guide

I always go through my affiliate links with redirects – or cloaking affiliate links – for the following reasons:

  • By going through them with my redirects, I have a click count to balance against the one the merchant is displaying.
  • Affiliate links are typically ugly and hard to recall unless you copy and paste. Redirects allow you to have short, easy-to-remember URLs for them and allow you to remember commonly used affiliate links.
  • If you are in a niche where you’re selling to other affiliates, it will stop individuals from replacing your affiliate ID with their own.
  • If you’re going to change networks or connect structures, you can change one redirect instead of having to change every location you’ve linked to them on your entire site.
  • If you’re going to change which merchant you’re using to sell something, you can change one redirect instead of having to change every location you’ve linked to them on your entire site.
  • If only a few of the merchants I mention on a regular basis don’t have affiliate programs, I’ll typically still cloak the link to their home website. This way, if they ever acquire an affiliate program, I can affiliate all my previous links to them by simply updating the one cloaked link.
  • If you do have an affiliate datafeed site, anything that you can do to technically distinguish your site from the other 4000 affiliates who are accessing the same datafeed is a bonus as far as affiliate datafeed SEO is concerned.

What is cloaking affiliate links?

Cloaking an affiliate link basically means that you are creating URLs on your site that point to an affiliate link. For example:

This is my Optin Monster affiliate link without cloaking it: http://www.shareasale.com/r.cfm?b=601672&u=313242&m=49337&urllink=&afftrack=

This is my Optin Monster affiliate link after cloaking it: https://sugarrae.com/getit/optinmonster

Both links point to the same place, and both links will properly track my affiliate cookies.

How to create cloaked affiliate links

You don’t have to necessarily use a plugin to create cloaked affiliate links. You can accomplish this using this method described by Yoast or by modifying your .htaccess file.

But never, ever should you ever lay hands on your .htaccess file if you haven’t yet perfected its usage because a mistake there will destroy your entire website. .htaccess or the manual affiliate link cloaking via Yoast will leave you missing out on what else a link cloaking plugin can provide.

There are several affiliate link cloaking plugins, but I use the Pretty Link Pro WordPress plugin to cloak my affiliate links.

(Disclosure: I came across Pretty Link Pro years ago and paid for the plugin myself. Pretty Link Pro has an affiliate program which I became a member of after I already had the plugin and was already using it. I link to the plugin with affiliate links. What this means is that at no extra cost to you, I might earn a commission if you purchase the plugin.)

There is also a free version of the plugin, Pretty Link Lite, but the Pro one has features that I won’t survive without – like being able to modify the base slug in the cloaked links.

Installing Pretty Link Pro

You’ve purchased and downloaded the plugin, now you need to install it.

  1. In your WordPress dashboard, go to Plugins > Add New
  2. On the top of the next screen, click on the Upload a Plugin button
  3. Select the PLP plugin file from your computer and click Install Now
  4. Click Activate Plugin on the next screen

Your plugin is installed and ready to be configured.

Confirming your purchase of Pretty Link Pro

To enable the more advanced functionality in the plugin, you’ll want to confirm your purchase of the plugin before setting things up.

  1. Look for a Pretty Link tab in the left hand menu of your WordPress dashboard
  2. Move the cursor over the Pretty Link tab so that the submenu is displayed
  3. Click on the last link in the list named Pretty Link Pro
  4. On the following page put in your username and password for the account you created at Pretty Link Pro when you purchased the plugin
  5. Click Save
  6. Click the Get Started button at the top of the resulting screen

Once you have finalized your purchase, and click the Get Started button, you will notice that at the top of the screen in the Pretty Link admin area there is a notice that you must upgrade your database. Click the Automatically upgrade your database link and it will automatically do it for you.

Setting up the options in Pretty Link Pro

Pretty Link Pro has a tremendous amount of options, but I’m going to keep it simple and walk you through the basic options that I set up when I install it so that you can get started without being overwhelmed with all the additional options that you may or may not want to implement. Take this as a quick start tutorial.

Setting Up the Basic Options

  1. Click on the Options link below the Pretty Link navigation pane within the left menu of your WordPress dashboard. Three expandable options are found on this page: Link Options, PrettyBar Options, and Reporting Options. We’re going to expand and focus on the Link Options and Reporting Options within this section.

Link Options

  • Click on the [+] symbol next to the Link Options section in order to expand it.
  • Track Link will default and should be left so
  • I also unselect the nofollow option so all of my cloaked links default as nofollowed
  • Default Link Redirection Type will default to 307 Temporary Redirect and I leave it so
  • When all is exactly like the above screenshots, click Update Options at the bottom of the page

Reporting Options

  • After you’ve set up the basic Link Options, you’ll then want to click and add the Reporting Options section.
  • I leave out my IP address so Pretty Link won’t include my clicks on any Pretty Links in the reporting
  • The plugin alerts you to what your IP address is, so simply copy and paste it into the IP field above
  • I also uncheck the box for excluding known robots
  • Normal Tracking will be on by default and I leave it that way
  • Once everything here matches the screenshots above, click Update Options at the bottom of the screen

Note: If you’re crawling links on your site with a plugin like Broken Link Checker, you’re going to have skewed click reporting because Pretty Link will be tracking the plugin’s clicks and reporting them. So if you’re hosting that plugin – or one like it – you’ll have to exclude your website’s IP address in the Excluded IP Addresses field. You can find your website’s IP address here.

Setting up the Pro Options

Once you’ve set up the initial options, you can find the Pro Options by going to Pretty Link’s navigation panel in your WordPress control panel’s left-hand menu. There are six collapsible options on the next page: Keyword & URL Replacement Options, Page and Post Options, Twitter Options, Social Network Options, Public Link Creation Options, and Global Options.

Once more, we’re going to make it simple and focus on the Keyword & URL Replacement Options and Global Options.

Keyword & URL Replacement Options

What it does: When you set up a Pretty Link, you can define keywords or phrases that are to be used in applying it so that Pretty Link links instances of such a phrase or word to your Pretty Link for such an affiliate program automatically.

Using the automated replacement of keywords and URLs, you expose yourself to a chance that you may be carrying hidden affiliate links on your site. In order to remain compliant with the affiliate link disclosure FTC guidelines, I prefer hard coding the Pretty Link affiliate links like I would any other link. This enables me to have control over how I ensure that I have disclosure in any piece of content that has an affiliate link.

Because of that, I disable this feature by unchecking the box next to Keywords and URL Pretty Link Automatic Replacement and saving.

It was a feature I had turned on before the release of the FTC guidelines, but I’d rather be safe than sorry and not be sued for insufficient disclosure.

Global Options

This is where you’re able to replace the base URL for your Pretty Links. Your Pretty Link would then simply be something like this by default:

http://yourdomain.com/myprettylink

But I prefer to have all my Pretty Links in a subfolder so I can simply stop Google from crawling them (we’ll cover that later on in the post).

  • I check the box next to Use an alternate Base Url for your Pretty Links
  • I put the Pretty Link Base URL in the field that shows up when I click the box
  • Set Minimum Role Required To Access Pretty Link is set to administrator by default and I leave it that way
  • Once all has fallen into place like the above screenshots – with your own URL in the place of the URL in the screenshot – click Save at the bottom of the page

You can define the base URL to whatever you prefer it to be, but don’t add a trailing slash at the end of the URL. Some common base URLs users use are out, go, goto, link, etc.

Once again, Pretty Link features a ton of things I haven’t mentioned throughout this post, but the ones listed above are the important settings I set on each site. You can mess around with more advanced features once you get comfortable with the plugin.

Leave a Comment