How to Cloak Your Affiliate Links – Different Methods Explained

Affiliate marketing is a great way to make money online. However, if you're not cloaking your affiliate links, you're leaving money on the table

In this blog post, we will discuss what affiliate link cloaking is and why you should use it. We will also provide instructions on how to cloak your affiliate links using three different methods.

Let's get started!

What is Affiliate Link Cloaking?

When you're an affiliate, one of the most important things you can do is cloak your links. Cloaking is when you change the appearance of a link so that it's not easily recognizable as an affiliate link.

Why Should You Cloak Your Affiliate Links?

There are a few reasons why you would want to do this. Cloaking affiliate links is a process of hiding the original link with a redirect. This can be done for a number of reasons, the most common being to hide the affiliate ID from the user, or to make the link more aesthetically pleasing.

For example, instead of a long and ugly URL like this:, you can redirect it to

Not only does this look better, but it also hides your affiliate ID.

A cloaked link can also help you to avoid having your links banned by ad blockers. Ad blockers are becoming more and more common, and they can block out anything that looks like an affiliate link. By cloaking your links, you can make sure that they're not blocked.

Cloaking can help you to avoid "link rot." Link rot happens when an affiliate link changes without you realizing it, and when people click on the old link and don't get taken to the right place.

By cloaking your links, if the link URL needs to be modified, you just need to do it once and all your cloaked links on your site will automatically update. This happened to me before so believe me, it's a pain to go and update all your links manually. Finding them is a huge time waster let alone frustrating.

So if you're an affiliate, make sure to cloak your links!

How to Cloak Affiliate Links Without a Website

Yes, it is possible to cloak affiliate links even if you don't have your own website. You can do this using a URL shortener. They are free to use and very simple to set up. Here are the most common ones:Bitly


 is probably the easiest tool to use. All you need to do is paste your link into the box, select how long you'd like your shortened link to be, and hit "Create." From here, you can choose to embed the link onto another web page or even send it via email. Many affiliate marketers on YouTube use to cloak their affiliate links. I'm sure you've heard them say many times -"links in the description below."

2. TinyURL

TinyURL is similar to Bitly, except it doesn't offer the same level of customization. Instead, you simply enter your URL, select how long you want it to be, and press "Create." After that, you can either copy the code directly or save it to your clipboard.

3. Rebrandly

Rebrandly is a URL shortener and link management platform that offers users the ability to brand, track, and share their links. In addition to custom URLs, Rebrandly also offers users the ability to add their own logo, track clicks and conversions, and share links on social media. Rebrandly is an ideal solution for businesses and individuals who want to brand their links and measure their link performance.

How to Cloak Affiliate Links Without a Plugin

While there are WordPress plugins that can automatically cloak your affiliate links, it is also possible to do this manually without a plugin. If you are new, I don't suggest using this method. Instead, use a plugin which I will discuss next.

To cloak your affiliate links manually, you will need to create a file called .htaccess in the root directory of your website. If you already have a .htaccess file, you can add the following code to it:

RewriteEngine On

RewriteCond %{HTTP_COOKIE} !^.*(affiliateID1|affiliateID2).*$ [NC]

RewriteRule ^(.*)$$1?a_aid=affiliateID [R=301,L]

Replace "affiliateID1" and "affiliateID2" with your actual affiliate IDs, and replace "" with the URL of your website.

This code will redirect any traffic that does not have an affiliate cookie to your website with the affiliate ID attached to the URL as a query parameter. You can then use this query parameter in your links to track clicks and commissions.

Make sure that you change the file permission of .htaccess to 644 after you save it, or else it will not work properly. Keep in mind this method will only work if your website visitors are using cookies. If they have cookies disabled, they will still be able to see your affiliate links.

How to Cloak Affiliate Links Using a Plugin

If you have a WordPress site, the best way to cloak your affiliate links is by using a WordPress plugin. I personally use Pretty Links, but most of them all work the same way.

Let me demonstrate how you can cloak your affiliate links using Pretty Links. Oh, and by the way, they do have a paid version but you don't need it. The free version is perfectly fine so there's no reason not to use it!

Example: Using Pretty Links for Affiliate Link Cloaking

Pretty Links is one of the most popular link cloaking plugins for WordPress. It has both a free and premium version. The free version offers basic features, while the premium version includes additional features such as link split testing, automatic keyword insertion, and more. Overall, Pretty Links is an easy-to-use plugin that can help you to manage all your affiliate links.

Here is how it works:

Step 1: Install the Pretty Links plugin

Log in to your WordPress dashboard. Go to Plugins > Add New and search for "Pretty Links". Install and activate the plugin.

Step 2: Access the Plugin

Once the plugin is activated, you will see a new menu item called "Pretty Links" in your dashboard. Click on it to access the plugin settings page.

On the Pretty Links page, you will then create a new link. Click on the "Add New Link" button.

Step 3: Create Your Link

A popup window will appear where you can enter the URL of your affiliate link, choose a redirect type, and add any keywords or notes. Once you're done, click on the "Create Link" button.

For the redirect, if the link isn't going to change, then just use a 301 redirect. If you are going to change this affiliate url often, then use a 307 redirect.

For the link, I usually like to use either "go/" or "recommends/" before the product name.

For example, if you are promoting a product named "blue widgets", you can name your affiliate link go/blue-widgets or recommends/blue-widgets.

The full URL would look like this - As you can see, this cloaked affiliate link looks much better than the long-form ugly affiliate link and also builds trust.

Affiliate Link Cloaking Customization With Pretty Links

Included in the free version are some customizations that you can use such as:

  • No Follow: Use this for every affiliate link - make sure it is checked. This tells the search engines to not pay attention to this link so you won't use any link juice.
  • Sponsored: You can use this as an alternate to no-follow for affiliate links
  • Parameter Forwarding: This link will forward the parameters that are passed to it to the Target URL.
  • Tracking: Enable Pretty Link's built-in click tracking

I normally just use "no follow" and "tracking" for all my affiliate URLs. One thing I have noticed is that there is a slight delay if using "tracking" when clicking on the link. This is because Pretty Links is using extra resources to capture tracking data when it's being clicked. 

If you have a slow server, I suggest to not use tracking. If your potential customer has to wait more than three seconds for the link to open, they will likely click off.


Have you started cloaking your affiliate links yet? It’s a great way to keep track of where your clicks are coming from and ensure that you get credit for sales. Plus, it makes your links look cleaner and less spammy to potential customers.

I showed you how to cloak affiliate links without a website or plugin – but if you have a website, you can use a plugin like Pretty links (which I showed you) or other ones like Thirsty Affiliates which is another popular one.

A plugin is the easiest way, but it does take up some resources whereas doing it manually does not. The affiliate marketers that are in the know use it - so you should too! If you're new to affiliate marketing and need some help, check out my course suggestions.

Frequently Asked Questions

How do I cloak affiliate links for free?

All the methods shown on this page are free. Some of the URL shorteners and plugins like Pretty Links and Thirsty Affiliates have paid plans, but the free plans are adequate enough.

How do I hide affiliate links on Facebook?

To hide affiliate links on Facebook, use a URL shortener like Bitly or Rebrandly. These services allow you to change the link to something shorter and more manageable.

Can I cloak my Amazon affiliate links?

No. This could get you in trouble with Amazon. Amazon has its own URL shortener built into its platform - use that one.

Do I need to cloak my affiliate links?

Cloaking your affiliate links is not required but it is recommended. Cloaking your affiliate links has several benefits including improved click-through rates and better link tracking.

Why should you be careful with cloaking your referral links?

You should be careful when cloaking your referral links because some affiliate programs do not allow it. Be sure to check with your affiliate vendor if they allow links to be cloaked. Most do, because they understand why. If not, find another affiliate program that does! Cloaking your links can also lead to problems with link tracking if not done correctly.

Do I need to cloak my affiliate links on Pinterest?

You can, but there's a risk of getting it removed. It's always best practice to link to a landing page that you own, rather than an affiliate link that is cloaked.

Does YouTube Allow link Cloaking?

YouTube allows link shorteners, but the debate is out whether or not your link shortened affiliate link will last. I have seen YouTube ban some shortened affiliate links but not others. Amazon affiliate links are plenty, so for the most part you should be safe.

Related Articles:

Drew Mann