This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Join the live AMA session with Adam Silverstein on open source and WordPress core! Register Now →

Affiliate Link Cloaking – Two Efficient Ways to Cloak Links on Your WordPress Site

Updated on September 4, 2023

10 Min Read
A-Complete-Guide-to-Affiliate-Link-Cloaking-Banner

Overly lengthy affiliate links are a common problem that affiliates face. Especially those new to the game. After all, how do you get users to click on these long links?

Thankfully, the solution is quite simple: affiliate URL cloaking. By “cloaking” a link, you will make it cleaner and, what’s more, personalize it according to your branding. It’s imperative if you sell affiliate products on your website.

Affiliate link cloaking offers many benefits, the most significant of which are clean, identifiable links and protection from data theft.

In this blog, we’re going to take a look at what affiliate link cloaking is in detail, its benefits, how to implement it, and much more.

What is Affiliate Link Cloaking?

As you can probably guess from the name, link cloaking refers, literally, to “cloaking” the original link and disguising it so it looks simpler. Think of it as a way of cleaning up the links.

People generally avoid clicking on overly long links in the first place. Your audience can find it hard to deem them “trustworthy.” Also, link cloaking helps affiliates track commissions and hide their affiliate IDs for data protection.

Thus, affiliate link cloaking improves link security and how links are presented on your website. Here’s an example:

cloaked link

Image from Shoutmeloud

Note: While link cloaking is truly a way to build your audience’s trust, adding appropriate affiliate disclosures will further boost the trust. That’s because your audience will know you are selling something rather than tricking them under the guise of “helping.”

In fact, many people buy using affiliate links when they see affiliate disclosures to help the affiliates earn more.

Note: In the example above, the uncloaked link belongs to Amazon. That’s because Amazon links are protected under their Amazon Operation Agreement.

Hey, Affiliates! Want to Earn $125 per Sale?

Cloudways offers lucrative offers to its affiliates. Timely payouts, flexible models, low customer churn, and lots more are waiting for you to unpack. Become an affiliate and start earning right away!

The Major Benefits of Using Affiliate Link Cloaking

Utilizing cloaked links for affiliate URLs allows you to craft custom links for your audience, enhancing the credibility of your destination links. Let’s explore further benefits of using cloaked links for your business.

User-Friendly Affiliate Link Management

Managing those lengthy links can seem difficult if you are working with multiple affiliate programs. But cloaking and personalizing these offers a simple solution to easily managing multiple links.

Using the affiliate links as they are can be a tedious feat to manage. Why? You’ll have to manually track and manage the links – sales they generate, clicks they receive, etc.

By cloaking links with a tool, say ThirstyAffiliates, you can keep track of all your links in one dashboard. Even if you are associated with different affiliate programs, you can track all the links in one place. Hence, easy management of your affiliate links. All thanks to link cloaking.

To make things even more manageable, you can separate links into different categories based on campaigns, affiliate programs, etc.

And most cloaking tools offer other services as well, such as link redirection, conversion tracking, etc.

cloudways unique link

Cloudways Unique Affiliate Link

Here’s a good example of how you can track your links via ThirstyAffiliates:

example link

Easy to Share

Another major advantage of using link cloaking is that it makes your links very easy to share – an invaluable property for affiliate marketers.

When they are small and easy to manage, they automatically become more shareable. Why? Because clean URLs are more trustable and easily remembered. Plus, they convey the message to the viewer clearly.

Suppose you are browsing the internet and see a link:

emruts.com/shoes-for-men

Now, if you are someone looking for shoes, you’ll most likely click the link. On the other hand, if you see a messy link such as:

wordpress.expressstuff.com/xysq123%%8948##/aff-id-325%%$596/shoes$5423#

You’ll most likely avoid the link. And so will someone who’d otherwise share a cleaner link like the former one. Bottom line – Cleaner links are more shareable because they convey the message clearly, are easy to read, and are overall more convincing for your viewers.

Convenient Link Tracking

Affiliate link cloaking makes it simpler to track traffic from different links, boosting your link management efficiency and overall workflow.

You will be able to figure out which links are generating more traffic. For instance, if you have a pair of links leading to different product pages, employing link cloaking assists in determining which resonates better with your intended audience.

By monitoring these links, you can discern which item garners higher visitor engagement.

Makes Your Links Trustworthy

An ugly link with lots of irrelevant things will repel your visitors. There’s a high chance they’ll treat it as something malicious and avoid it.

A neat and clean, cloaked link that’s easy to understand builds trust.

messy link example

Look at the link above. Suppose you are looking for WordPress hosting; would you click the link above?

Highly unlikely.

On the other hand, if you see a clean link like the one shown below, you are likely to treat it as a safe one and click it.

clean link

So, cloaked links are trustworthy, whereas uncloaked links damage trust because they look malicious.

Better Brand Recognition

With cleaner and easy-to-understand links, you make a stamp in the minds of your viewers, and they start remembering your name better.

Consider a scenario where visitors encounter 5 pages on your website. This imprinting of your name in their memory can subtly incline them towards choosing you for their shopping needs.

For instance, envision owning a shoe and clothing store named Emruts, with pages like:

  • emruts.com/ladies-shoes
  • emruts.com/men-shoes
  • emruts.com/new-fashion
  • emruts.com/ladies-tees
  • emruts.com/gents-tees

These clear-cut links instantly convey page content, and consistent brand exposure reinforces product association.

How to Cloak Affiliate Links in WordPress by Using Thirstyaffiliates

Cloaking affiliate links in WordPress is actually quite simple, and you can easily do it through a third-party plugin like ThirstyAffiliates. It’s one of the best affiliate marketing tips because it saves affiliates a lot of time and effort. Here’s our step-by-step tutorial on cloaking links in WordPress using the Thirstyaffiliates plugin.

Let’s run through this step by step:

  • Go to Plugins and click Add New.

add new plugin

  • Search for ThirstyAffiliates and click Install Now.

 install now plugin

  • Then, click the activate button, and you’ll find ThirstyAffiliates activated on the left pan menu of the CMS. You must then go to the Affiliate Links option, as shown below. You can also directly click on the New Affiliate Link option if you are just starting out.

thirsty affiliates

  • You’ll then see the menu where you can manage all your affiliate links. To add a new affiliate link from there, you’ll need to click the New Affiliate link button.

new affiliate link

  • The window for link cloaking will pop up. First, you’ll put the destination URL (the link where you want your audience to go. Once you put that in, you’ll see a cloaked link template for your destination URL.

adding affiliate link

  • Once you make the changes and set your customizations, you will click on Save Link. And that’s pretty much it.

save affiliate link

  • You can even go to the Link Categories option and play around with your links.

link categories

There are many other things that you can do with ThirstyAffiliates besides link cloaking. And if you are a paid member, you’ll unlock several other features as well, such as automatic KW linking, Amazon API importing, exporting and importing data in different formats, etc.

Can You Cloak Affiliate Links Without a Plugin?

Yes, you can also do that. Here’s our simple guide for cloaking affiliate links without using a plugin.

Step 1: Create a New Folder

First, gain access to your server. You can do this using any FTP client like FileZilla. It will look something like this when you access the main directory on the server:

filezilla

You can then create a new folder on the server. Name it something like “affiliate links.”

Step 2: Upload the index.php File

Then, create another file entitled index.php and add the code as given on Yoast’s GitHub repository.

<?php
 
$id  	= isset( $_GET['id'] ) ? rtrim( trim( $_GET['id'] ), '/' ) : 'default';
$f	= fopen( 'redirects.txt', 'r' );
$urls	= array();
 
// The file didn't open correctly.
if ( !$f ) {
  echo 'Make sure you create your redirects.txt file and that it\'s readable by the redirect script.';
  die;
}
 
// Read the input file and parse it into an array
while( $data = fgetcsv( $f ) ) {
  if ( !isset( $data[0] ) || !isset( $data[1] ) )
    continue;
  
  $key = trim( $data[0] );
  $val = trim( $data[1] );
  $urls[ $key ] = $val;
}
 
// Check if the given ID is set, if it is, set the URL to that, if not, default
$url = ( isset( $urls[ $id ] ) ) ? $urls[ $id ] : ( isset( $urls[ 'default' ] ) ? $urls[ 'default' ] : false );

if ( $url ) {
  header( "X-Robots-Tag: noindex, nofollow", true );
  header( "Location: " .  $url, 302 );
  die;	
} else {
  echo '<p>Make sure yor redirects.txt file contains a default value, syntax:</p>
  <pre>default,http://example.com</pre>
  <p>Where you should replace example.com with your domain.</p>';
}

Step 3: Add the Links in the Redirects.txt File

Once you have added the code, the next step for affiliate link cloaking is to create a new file. Name it redirects.txt. Essentially, you can add the destination URL as well as the link slug here.

The format is as follows:

Website-slug, https://destinationlink.com/affiliateid=987

Then give a line break, and add each affiliate link in a separate line:

Website-slug, https://destionationlink.com/affiliateid=987

Cloudways, https://cloudways.com?cloudid=389

Step 4: Block Crawlers

You don’t want Google or other search engines going through your redirects. To prevent that from happening, it’s best to add a rule to your robots.txt file. Just open the robots.txt file and add a rule:

Disallow: /affiliate-links/

This is the name of the folder you create in the root directory.

Run Your WordPress Affiliate Websites Faster With Cloudways!

We have a dedicated stack for WordPress websites. That leaves you with faster and more secure websites that your website visitors will enjoy. Also, we offer 99.99% uptime, so there’s no disruption in your affiliate sales!

Top 5 Affiliate Link Cloaking Plugins

Now, if you want to use plugins, here are the top three that you can choose for your website.

1. ThirstyAffiliates

thirstyaffiliates plugin

Price:

  • Basic: $79.5
  • Plus: $129.5
  • Advanced: $199.5

Thirsty Affiliates is one of the oldest players in the game and allows you to cloak links (tutorial given above) directly from your WP Dashboard.

Key features:

  • Automatic keyword linking
  • Link cloaking
  • Advanced link insertion types
  • Statistical reporting available
  • WooCommerce integration available
  • Link shortening is also available

2. Pretty Links

pretty links

Price:

  • Beginner: $99.5
  • Marketer: $149.5
  • Super Affiliate: $199.5

Pretty Link is another plugin used for link shortening, especially for custom links. It’s a great way to clean up your affiliate links and cloak them according to your preferences.

Key features:

  • Easy management of social links and URL directs
  • Compatible with multiple URL redirect methods
  • Find and fix broken links
  • Developers roll out updates frequently

3. Simple URL

simple url

Price: Free

Simple URL is another link shortener that works seamlessly with WordPress websites. It’s a clean affiliate link cloaking plugin that you can use on your WordPress website to shorten the links.

Key features:

  • No-code plugin
  • Easy link cloaking and link shortening
  • Link Finder for finding forgotten or misplaced links

4. Easy Affiliate Links

easy affiliate links

Price: Starts free but offers paid upgrades

Easy affiliate links is a WP plugin that you can use to cloak your links. It works great with WordPress websites and is compatible with WP versions 3.5 and higher.

Key features:

  • Import and export links to XML and CSV
  • Track click counts
  • Ability to make short links to cloak affiliate links
  • Automatic text disclaimer for your affiliate links
  • Works with both – classic editor and Gutenberg editor

5. URL Shortener Pro

url shortener

Price:

  • Single product: $19-39/year
  • Extended membership: $199/year

URL Shortener Pro is an affiliate link cloaking plugin with lots to offer. It’s compatible with most WordPress themes and is best for people who are at an intermediate or advanced level of their affiliate journeys.

Key features:

  • One-click installation
  • Compatible with any redirection method
  • Offers multilanguage feature
  • Secure and optimized code

Difference Between Link Cloaking and Link Shortening

Now, link cloaking can easily appear to be shortening the link. In essence, you are contracting a messy link and making it more readable and clearly communicating the message.

And many people use these terms as alternates. However, they aren’t exactly synonymous. Link cloaking means making the link easy to read and understand, while link shortening means building a short link that redirects users to other links that could be unpleasant to read or not.

Link shortening is usually done using services such as Bitly or TinyURL.

Bottom Line 

This is a simple yet effective guide to cloaking affiliate links on your website. Using a plugin is obviously the easier option because it reduces time considerably. It also makes it easy for affiliates to streamline the different links that they use to promote certain programs.

Q. How Does Affiliate Link Cloaking Work?

A. Affiliate link cloaking works when you condition the messy and visually unpleasant links into something easy to understand. You can do it by going into the backend of your website or by using plugins such as Pretty Links, ThirstyAffiliates, URL Shortener Pro, etc.

Q. Does Link Cloaking Affect SEO?

A. No. Link cloaking doesn’t have much impact on SEO efforts. However, if you cloak malicious links on your page, your website can take a hit and lose rankings on the SERPs.

Q. Can You Cloak Amazon Affiliate Links?

A. No. Under the Amazon Operation Policies, you can’t cloak Amazon links. That’s likely because it interferes with tracking the traffic, and figuring out where visitors come from would be confusing. Therefore, thoroughly read the Amazon guidelines before becoming an affiliate.

Q. Can You Cloak Affiliate Links Without a Website?

A. Yes, you can, but there will be several challenges with tracking, data collection, and redirecting visitors. It’s best to cloak links when you have a website. Else, for other platforms, you can seek help from link-shortening tools.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Usman Dar

Usman is a Digital Marketer at Cloudways- A Managed Cloud Hosting Platform, where he looks after affiliate partnerships and helps digital nomads in generating passive income. He is a foodie by heart, who loves to explore new eateries around his vicinity.

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

Highest Ever Commissions

$100/Sale
+ $50 Bonus

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

Start Earning Now
  • Monthly Payouts
  • Lifetime Commissions
  • Performance Based Slabs
Become Affiliate Now

Promo Code: BFCM4040