Link masking and link cloaking: a guide for affiliate marketers

Have you heard of link cloaking but need clarification on what it’s all about? It might sound mysterious or even sinister, but it’s an efficient and totally harmless way to manage your affiliate links.

As a website owner or affiliate marketer, ict is essential to present your links cleanly and user-friendly. Imagine running an online marketing campaign with long, complex product links that aren’t appealing to your audience. Simplifying those links makes them more attractive and accessible to share. This is where link masking comes in.

Understanding link masking is incredibly valuable for those who monetize websites with ads. In this tutorial, I’ll explain what link masking is, how it works, and its benefits and drawbacks. We’ll cover the technical background and process and offer advice on using link cloaking manually, through a database, or with plugins. Finally, I’ll show you how to use the Advanced Ads plugin for link masking.

By the end of this guide, you’ll understand link masking and be ready to implement it effectively on your WordPress website. So let’s get started!

Link masking, also known as link cloaking, hides a complex URL behind a more user-friendly and attractive one. This technique often makes affiliate links look better and easier to remember.

For example, a standard affiliate link to an online shop product might look like this:

https://affiliate-webshop.com/category/4b/product-xyz/?ref=34

Using link masking, you can turn it into something much simpler and more appealing, like this:

https://www.yourwebsite.com/earthwise-shredder

Users who click the masked link will be redirected to the original, lengthy URL without ever seeing it. This makes links easier to share and more visually enticing.

Illustration of the concept of link cloaking

The term “link cloaking” has evolved. Initially, it described a technique that disguised a user’s destination URL in the browser’s address bar by displaying the landing page within an iframe, hiding the target website.

Nowadays, link cloaking primarily refers to link masking, a legitimate practice. It’s important to distinguish between link masking and SEO cloaking. SEO cloaking violates search engine guidelines and might harm your website’s visibility. Link masking hides a long URL behind a shorter one, while SEO cloaking presents different content to search engines than users and hides its origin, which is unethical and manipulative.

Google’s stance on SEO cloaking

Google explicitly condemns SEO cloaking in its webmaster guidelines. It considers this technique a violation of search engine spam policies, which could lead to penalties, including removal from search results.

Here’s an excerpt from Google’s guidelines that clarifies their position on cloaking:

Cloaking refers to the practice of presenting different content to users and search engines with the intent to manipulate search rankings and mislead users.

Google Search Central Blog

Google’s examples, such as showing different content to search engines than human users, clearly demonstrate the manipulative intent behind SEO cloaking.

More appealing URLs with higher click-through rates

The main reason for using link masking is to hide an irritating destination URL. Long affiliate links, like those mentioned earlier, aren’t ideal for display in the browser. Link masking makes them cleaner and more straightforward, hiding elements like affiliate IDs and tracking tags. Users trust a disguised link more, leading to a higher click-through rate (CTR).

An illustration visualizing the formula for click-through rate: CTR equals clicks divided by number of impressions

Updating affiliate links across your blog can be time-consuming if they’re scattered throughout your website. Link cloaking centralizes your affiliate links, making them easy to manage and update. Centralized management also allows for setting attributes like “sponsored” or “nofollow” to ensure proper handling of these links by search engine crawlers.

Easy click analysis

Link masking retains tracking capabilities, hiding tracking parameters in the masked link. Some plugins, like Advanced Ads, offer enhanced tracking features, allowing you to analyze link impressions and clicks and create dedicated email reports.

Prevent manipulation and commission theft

Link cloaking prevents tampering by obscuring URL parameters, making it harder for users to manipulate or remove them. This protection helps to combat content thieves.

Moreover, masking the target URL also challenges ad blockers in identifying ads. This added layer of disguise will help maintain the effectiveness of your advertising efforts, ensuring that your affiliate links remain intact and clickable.

Policy of the partner program

Some affiliate programs, including Amazon, do not allow link cloaking. Amazon’s policy explicitly states:

“You will not cloak, hide, spoof, or otherwise obscure the URL of your Site containing Special Links (including by use of Redirecting Links) or the user agent of the application in which Program Content is displayed or used such that we cannot reasonably determine the site or application from which a customer clicks through such Special Link to an Amazon Site.”

Amazon Associates Program Policies

Even though many affiliates violate this rule, I am unaware of any case where Amazon banned someone from the Amazon referral program because of it. Nevertheless, you should adhere to the rules, and when using text links to promote Amazon products, do not cloak the link; instead, use the official Amazon link shortener.

Diminished user experience

Obscuring the true target URL of your links could surprise users and create a poor experience if you direct them to a shop instead of an informational page. It’s important to indicate the target where links lead and to include affiliate disclaimers.

Link shortening and link cloaking are both strategies for tidying up affiliate URLs. They serve different purposes and have distinct functions.

Link shortening simplifies long URLs for convenience and aesthetics without hiding the destination. It’s useful for sharing links in social media posts, emails, and text messages.

A long URL like

https://affiliate-webshop.com/category/4b/product-xyz/?ref=34&utm_source=affiliate&utm_medium=affiliate&utm_campaign=productpromotion

might be shortened to https://bit.ly/2A1B2C3.

In contrast, link cloaking deliberately obscures the true destination of a URL, often to make affiliate links appear more professional or trustworthy.

Several link-shortening tools are available, with Bitly and TinyURL being among the most well-known. Both offer free services and premium upgrades:

  1. TinyURL
  2. Bitly
  3. Rebrandly

Cloaking an affiliate link works by redirecting the visitor through a URL redirection. A URL redirection is a dummy URL that directs the visitor’s browser to another location. This page doesn’t exist on the website; it is merely a placeholder. The are various methods to accomplish this, which I will explain below.

Here is the process that the browser goes through:

  1. When you click on the masked link, your browser requests the content of the page website/link/productname from your website.
  2. Next, your website responds that the page does not exist and instructs your browser to go to another destination to retrieve the content.
  3. Finally, your browser reads the response and visits the new URL instead.

URL redirect types

URL redirections are categorized according to the HTTP protocol. The three main types are 301 (permanent), 302 (found/temporarily moved), and 307. For affiliate links, the 307 redirection is the best choice.

HTTP response status code 301

A 301 status code is employed for permanent changes, typically when a webpage’s destination URL has been altered. The everyday use cases are during URL structure modifications or when migrating a website to a new domain. This type of redirect signals to search engines that the page has permanently moved to the masked URL, aiding in preserving SEO rankings over time. Using it for affiliate links may not be the best choice.

HTTP response status code 302

A 302 status code indicates temporary redirection. Employ this type to avoid a permanent redirection to the link destination. Additionally, from an SEO perspective, a 307 redirect is safer for masking affiliate links. Unlike a 301 redirect, it doesn’t transfer link equity (PageRank) to the destination URL, addressing potential concerns regarding SEO impact.

If you’re utilizing a masked URL for a short-term campaign or promotion, a 302 redirect communicates that the change is temporary. This redirect may not be ideal for all affiliate links, especially if they involve specific actions.

HTTP response status code 307

A 307 redirect is similar to a 302 redirect but maintains the request method (POST/GET) to continue actions like form submissions and user tracking functioning as expected. Like a 302 redirect, a 307 redirect also improves user experience by utilizing cached versions of pages, leading to faster loading times.

URL framing, also known as a masked redirect, is a form of link cloaking discussed earlier in this article. It shows content from one URL while keeping the original URL in the address bar. However, search engines like Google can see this method as deceptive, harming your SEO.

Here’s how it works: When a user clicks on a link, JavaScript code will load a new URL into the frame of the current website while the original URL remains in the browser’s address bar. Hence, the user sees the new content, but the address bar shows the original URL.

However, I strongly advise against using this method to keep visitors in your home domain. It risks being perceived as deceptive by search engines like Google, which could harm your website’s SEO in the long term.

Now, let’s get down to the implementation of link masking. There are two common ways to implement redirects in your blog: dedicated WordPress plugins and .htaccess redirects.

There are a couple of WordPress plugins that mask URLs on your website. Here are the most recommended:

  • Advanced Ads: The best WordPress plugin for website monetization offers features like link masking and advanced click tracking with the Tracking add-on.
  • Pretty Links: The free WordPress plugin for link masking is popular but provides limited options compared to the pro version.
  • Thirsty Affiliates: This link management plugin supports the Amazon API but provides fewer options without a pro plan.
  • Redirection: Manages redirects on your website, including basic tracking and conditional redirects.

There are a few more plugins that allow you to mask URLs in your WordPress website. Your choice depends on your budget, the features you need, and the user interface you prefer. Before you choose one, it’s also worth checking the ratings and number of plugin downloads.

For a comprehensive solution, I highly recommend Advanced Ads. It’s the most complete ad plugin available, offering not only link masking but also a wide range of features that significantly aid in monetizing your site. With Advanced Ads, you’ll save on additional plugins, such as dedicated WordPress cloaking plugins, keeping your website’s code lightweight and performant.

Here’s a step-by-step guide to activating the Link Cloaking option in Advanced Ads. This feature is part of the Tracking Add-on.

  1. Go to Advanced Ads > Settings > Tracking > Advanced.
  2. Specify the Click-link base to set the pattern for the Click-Tracking URL, e.g., recommendations. Ensure it doesn’t conflict with other posts or pages.
Link masking URL settings
Define link cloaking patterns like “recommendations” or “linkout” for your URLs
  1. To cloak the outgoing links of your ads and affiliate links, navigate to the Ad Edit page and activate the checkbox in the Target URL field. 
Link cloaking in WordPress using Advanced Ads
Enable the link cloaking by activating the checkbox in the target URL settings of your ad

That’s it! Advanced Ads will now display your affiliate links in an appealing structure.

For example, if you set linkout as the Click-link base, your cloaked links will have the structure https://example.com/linkout/3542532.

Tip: If you choose one of the two local tracking methods, you can use these links outside your website, such as in newsletters or social media, to track clicks.

Creating .htaccess redirects on your web server

This method to rewrite website URLs involves using a file called .htaccess . By modifying this file, you tell your server to show a different webpage than the one initially requested by the user.

There are free online redirection generators to create the required code snippets for your .htaccess file, for example:

Example for the Apache web server

You may download the .htaccess file, the index.php file, and the redirects.txt file for Apache on GitHub.

<IfModule mod_alias.c>
# Permanent redirect
# from https://www.example.com/products/item12345
# to https://affiliate-webshop.com/category/4b/product-xyz/?ref=34

Redirect 301 /products/item12345 https://affiliate-webshop.com/category/4b/product-xyz/?ref=34
</IfModule>Code language: PHP (php)

Example for the NGINX web server

Here, you can download a sample redirect script for NGINX.

# Permanent redirect 
# from https://www.example.com/products/item12345
# to https://affiliate-webshop.com/category/4b/product-xyz/?ref=34

rewrite ^https://www.example.com/products/item12345$ https://affiliate-webshop.com/category/4b/product-xyz/?ref=34

permanent;Code language: PHP (php)

Link masking is a valuable technique for affiliate marketers. It allows you to convert long and complex URLs into shorter, more user-friendly links while concealing the original URLs. It serves multiple purposes: link protection, URL hiding, central link management, and URL shortening.

Historically, link cloaking had negative connotations, especially among black hat SEO practitioners. However, due to Google’s aggressive actions against deceptive practices, the term “cloaking” has evolved to mean link masking.

As an affiliate marketer, it’s essential to understand and utilize link masking. Unless prohibited by specific affiliate networks, I recommend masking your links for improved click-through rates (CTR) and easier management. Centralized link management is particularly crucial if you handle numerous affiliate links.

Changes in affiliate links are cumbersome to update manually. Therefore, using a plugin like Advanced Ads, which offers centralized management, is highly beneficial. It streamlines the process and ensures your links are always up-to-date, saving you time and effort.

In summary, link masking enhances your affiliate links’ appearance, trustworthiness, and manageability, making it a must-know technique for any serious affiliate marketer.

Subscribe to our newsletter and get 2 add-ons for free!

* indicates required
Interests
What is link masking?

Link masking is a technique that hides a web page or resource’s actual URL from users while displaying a more user-friendly alternative. It is achieved by utilizing URL rewriting techniques within the web server configuration or using third-party tools. Link masking is a technique for hiding a link’s URL by replacing it with a shorter, more user-friendly version while directing users to the intended destination.

Why is link masking used?

Link masking is employed to make URLs more manageable, protect them from tampering, and enhance the user experience by presenting cleaner, more understandable links.

How is link masking done?

Link masking involves redirecting a URL through a different, often shorter, URL using techniques such as URL rewriting or server-side scripts. It can be utilized with popular ad management plugins for WordPress like Advanced Ads.

Can every link be masked?

You are able to mask most links, but platforms like Amazon prohibit link masking.

Can I mask my own links?

Yes, you may mask your links using link masking techniques for various purposes.

Is link masking legal?

Link masking is typically legal, but its usage may be subject to regulations or terms of service on specific platforms. Using it for deceptive practices could be illegal.

Can link masking affect my SEO?

When appropriately implemented, link masking typically has minimal impact on SEO. However, using link cloaking deceptively or excessively may negatively affect SEO rankings.

Can I use link masking to mask links to files?

Yes, link masking techniques can be applied to links leading to files, such as PDFs or images, providing a cleaner and more user-friendly URL.

Author image Joachim

Joachim started marketing his first local news website in 2009. Shortly after, he successfully monetized his travel blogs about Morocco. He is an expert in affiliate marketing in the tourism and travel industry. When he's not writing tutorials for Advanced Ads or supporting other users, he prefers staying in Marrakech or at the Baltic Sea.

With over a decade of industry expertise, Advanced Ads is your surefooted ally in the ad tech realm. Their array of WordPress ad manager plugins enhances your advertising strategy, ensuring effective ad placements. Rely on their ad tech proficiency to stay ahead in the dynamic world of digital advertising. Contact info

Advanced Ads icon

Make it better

Increase your ad management skills without spending more time.
Join over 150,000 publishers and AdOpts increasing their ad revenue.