How do I cloak my affiliate links? – Cloacking Affiliate Links Guide


In this post, I want to list a series of possibilities to hide affiliate links which is very common among those who work and earn with affiliates.

This practice is also called hiding affiliate links or cloaking affiliate links.

Why should I cloak my affiliate links?

I will deliberately avoid going too far into the ethical question: it is clear that if you hide a link with the intent of “teasing” the user, you risk compromising loyalty and credibility.

However there are several reasons that lead marketers to disguise or hide affiliate links, in fact with the use of this trick, many manage to increase profits by up to 35%.

This depends on various factors: in particular, there is still a lot of distrust, so if surfing is met with a link affiliate, many in principle (I would like to know, which principle?) Run away and do not click.

Some do this reasoning: if you put the affiliate link you earn so I can not trust your evaluation (here you can not give all wrong, very often affiliates recommend products and services never tested, but many, like me try to avoid this).

As we will see, however, masking the affiliate links can also be used to track, create a public for remarketing, etc.

Methods to hide affiliate links in WordPress without a plugin

To hide the display of the link there are several methods, and I will propose many simple and more complex ones.

So what can we do, to try to distract the user and not make him understand that it is an affiliate link?

Using a classic ShortUrl service

So-called URL shorteners there are so many the most famous which I use often and willingly is

How do they work? Very simply you just enter your affiliate link and create the shortened link, you will be returned a link that you can customize.

Through the panel, you can easily see the statistics on clicks later.

1. Redirect

Redirect via .htaccess

Through the .htaccess file, which you find at the root of your site, you can set a redirect for your affiliate links, just as you would for any redirect.


Redirect 301 /url-book

In this way, the user who clicks on the page will be automatically redirected to

2. Redirect with PHP file: Link cloaking script

Another widely used method is to create a folder at the root of the site which inserts PHP files that will redirect the user.

Very often the folders are called go, out, or off.

Here is the procedure:

Just open a text editor be it notepad or others. Enter the code:

header( ‘Location:‘ ) ;

Then save the file with the name you prefer remember to add the extension .php: for example link.php

Upload this file via FTP or file manager inside the previously created folder and the game is done: every click on your will take you to

3. Hide the affiliate links via HTML

Here is another solution, this time in HTML, to be inserted directly into the text:

<a href=”URL” onclick=”document.location.href = ‘URL’; return false;”>Clicca qui</a>

In this way passing on the link the user will see at the bottom of his browser the false URL but clicking will instead be directed to the real URL.

In this case, however, some browsers or antivirus could report the thing to the user.

4. Link-Cloaking Plugins

Best WordPress link cloaking plugin 2022

All solutions are perfect and work great on WordPress, however, there are several plugins that allow you to hide affiliate links and cloaking, let’s see some.

EasyAzon – Best for Cloaking Amazon Affiliate Links

If the products you intend to offer are Amazon products, then we recommend this exceptional plug-in. EasyAzon, when creating links to Amazon products will save you a lot of time.

Here are some of its features:

  • Inserting affiliate links on your web pages without having to leave the WordPress control panel
  • The links automatically adapt to the visitor’s geographic origin
  • The plug-in allows the direct insertion of products into the shopping cart, thus increasing the chances of conversion.

Pretty Link  Create a Custom Affiliate URL

Pretty Link this plug-in allows you to disguise and reduce the length of affiliate links. The plug-in is very light and does its job very well.

It is also provided with a monitoring feature that allows you to understand which links have better performance and which, however, not having been created exclusively for affiliate marketing it has additional functions:

  • Enables the creation of 301 and 307 redirects
  • Easy data export to CSV files
  • Creation of user-friendly URL

Custom Sidebars  Display Different Sidebars for Each Post

If you have an advertising sidebar that you use to sell affiliate products, then this is the plug-in that’s right for you. What you need to do is simply upload your images linked to a tracking code and you’re done. This plug-in is equipped with many useful features including:

  • Insert custom widgets and sidebar
  • Easy integration with WordPress
  • Well structured and codified.  No slowing down of the site

You can find these and other plugins, most of them have a limited free version and a paid version with a greater number of features: make your own evaluations according to your needs.


As I said at the beginning this is a guide on how to hide affiliate links I don’t want to go too far into the ethical question: what is certain is that the cloaking of affiliate links can be taken by many as a mockery and misconduct. I rarely use these methods and if I do it is for testing or for link tracking needs or for creating audiences and targets for marketing and remarketing campaigns.

Particularly in the field of insiders, where people are clearly smarter and able to recognize a masked link, Everyone then on their site or blog is free to do as they believe, even at the cost of losing the trust of their users (which to be honest at least in 80% of cases will not notice anything).

  • Cloacking Affiliate Links Guide


Best methods to cloak my affiliate links 2022

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to top button