Link Cloaking: How and Why Affiliate Links Are Masked

Link cloaking means replacing a long affiliate link with a short URL on your own domain that redirects the visitor to the merchant. Here is why it is done, which redirects to use, how to count clicks and where masking runs into affiliate program and platform rules.

Cloaking Basics11 min read
Link Cloaking: How and Why Affiliate Links Are Masked
Contents
  1. What link cloaking means in affiliate marketing
  2. Why hide affiliate links
  3. 301, 302 and 307 redirects: which to choose
  4. How to cloak affiliate links step by step
  5. Short affiliate links and click tracking
  6. Affiliate program and ad platform rules
  7. Being honest with users
  8. Common link cloaking mistakes
  9. Link cloaking vs traffic cloaking
  10. Where ArtisanClo fits in
  11. Summary

Link cloaking (affiliate link cloaking, affiliate link masking) means replacing a long affiliate program URL such as network.com/click?aff=1234&offer=55&sub=blog with a short, clear address on your own domain, for example your-site.com/go/robot-vacuum. The short link redirects the visitor to the merchant with your affiliate ID, and you get a tidy URL, click tracking and a single place to change the destination.

Let us separate the terms straight away. Link cloaking does not show different people different things: anyone who opens the short link ends up in the same place as everyone else. This is not what what is cloaking is about, where a filter decides which page to show to whom. Here it is only a URL and a redirect.

An affiliate link is the URL by which a merchant or CPA network knows that you brought the buyer. It usually contains an affiliate ID, an offer number and tags. It looks long and unappealing, and sometimes suspicious too: a string of numbers and parameters scares a reader more than a clear address does.

Masking solves this with a simple trick. On your site you create an intermediate URL that shows nothing and immediately sends the browser to the affiliate link. The reader sees your-site.com/go/..., clicks and lands at the merchant a fraction of a second later.

These links are most often used by:

  • review sites and blogs with affiliate recommendations;
  • authors of newsletters, channels and videos who need a short link in the description;
  • affiliates and media buyers who send traffic to the offer through their own landing page or pre-lander;
  • shops with referral programs where users share their own links.

Readability and trust

your-site.com/go/coffee-machine is easy to read, say out loud in a podcast and paste into a signature. People copy a long link with parameters with mistakes, and messengers sometimes cut it off.

Managing it in one place

If a link to one product appears in twenty articles and the program changes its URL or the offer closes, you change the destination in one record instead of editing twenty pages. For an affiliate it is also a quick way to switch traffic to another offer.

Click tracking

Every click passes through your server or service, so it can be counted: how many clicks an article, a newsletter or a header button produced. Without this you only see the numbers in the affiliate dashboard and do not know where they came from.

Protecting the commission

A bare affiliate link is fully visible, and some people strip out the affiliate ID on principle. A short URL does not invite that habit. It is not full protection, since the final URL is still visible in the browser after the redirect.

301, 302 and 307 redirects: which to choose

The technical basis of link cloaking is an HTTP redirect: the server responds to the browser with a status code and the URL to go to next.

Code Meaning Caching When it fits
301 Moved permanently Browsers and search engines remember it for a long time A permanent page move, rarely for affiliate links
302 Found at another URL temporarily Usually not cached Affiliate links whose destination may change
307 Temporary redirect preserving the method Not cached Same as 302, stricter per the standard
Meta refresh / JS Redirect from a page Depends on the page When you need an intermediate screen or a pixel

For affiliate links people usually choose 302 or 307. With a 301, a returning visitor's browser remembers the old destination and the offer change does not reach them right away. A redirect via a page with meta refresh or JavaScript is slower and breaks for visitors with scripts disabled, but lets you show a short message or fire an analytics pixel.

The simplest PHP redirect looks like this:

<?php
// /go/coffee-machine.php: temporary redirect to the affiliate link
header('Location: https://network.com/click?aff=1234&offer=55&sub=blog', true, 302);
exit;

Tip. Do not build chains of several redirects: short link → shortener → tracker → affiliate network. Each link adds delay and a point of failure, and platforms and programs look at the whole chain when they check it.

The order is the same whatever you use: a site plugin, a link shortening service or your own redirect.

  1. Choose a prefix. A separate folder such as /go/, /out/ or /recommends/ separates redirects from regular pages and simplifies rules for search engines and analytics.
  2. Use clear names. /go/delonghi-coffee-machine is better than /go/123: the URL shows where it leads and is easy to find in a report.
  3. Paste the full affiliate link, with the affiliate ID and a SubID tag that shows the source page in the network's report.
  4. Choose the redirect type: 302 or 307 for affiliate links.
  5. Mark links on the page with rel="sponsored" and add a note to the reader that the link is an affiliate link.
  6. Check the chain. Open the short link in an incognito window and make sure the visitor reaches the merchant with your ID and without extra intermediate hops.
  7. Reconcile clicks. Once a week, compare the number of clicks on your links with clicks in the affiliate dashboard. A big gap is a reason to look for a broken link or a lost parameter.

A broken affiliate link is a silent loss: the reader reaches the merchant and buys, but no commission is credited because the ID got cut somewhere. That is why steps 6 and 7 matter more than a pretty URL.

On its own, masking is just a redirect. The value appears when tracking is added.

  1. Source tags. UTM parameters or your own parameter are added to the short link to tell an article from a newsletter or a social post. How to tag is covered in UTM parameters and macros.
  2. SubID to the program. A tag is passed into the affiliate link so the network's report shows which page brought the sale. Details in click ID and sub ID.
  3. Postback back. The network reports the conversion by the passed ID, and you see not only clicks but money for each link. More in postback URL and S2S tracking.

When there are many links and the traffic is varied, a redirect turns into routing: different offers for different geos, different URLs for different devices. That is already a job for a link rotator or a TDS; more in TDS traffic distribution system.

Affiliate program and ad platform rules

Link masking is legal, but not allowed everywhere in every form.

Affiliate programs

Program terms differ, and there are no common rules. You will come across restrictions such as:

  • a ban on shortening or hiding the program's links, or a requirement that the merchant's domain is clear to the buyer;
  • bans on certain sources: brand bidding in search ads, unsolicited email, incentivized traffic;
  • a ban on direct links to the merchant from paid ads, only through your own content site;
  • a requirement to disclose that the link is an affiliate link.

Before masking a link, find the clauses about links and traffic sources in the program's terms.

Ad platforms

In ads, platforms check that the display URL matches the final page. Redirects through a tracker are usually acceptable if the visitor ends up where the ad promises and everyone ends up in the same place. A redirect that sends the review and the user to different places is a violation; that is cloaking as platforms define it, and accounts get banned for it. Check the current requirements in the platform's help center, since the wording changes.

Search engines

Organic traffic has its own rules. Search engines ask you to mark paid and affiliate links with rel="sponsored" (or nofollow), and site owners often block a redirect folder such as /go/ from indexing in robots.txt. Showing the search crawler one page and people another is cloaking that gets penalized; more in cloaking in SEO.

Being honest with users

Good link masking does not deceive the reader; it only removes noise. A few rules separate one from the other:

  • The link goes where the text promises. If the anchor says "buy from the manufacturer", there should not be a third-party shop behind it.
  • The affiliate nature is disclosed. A short "affiliate link" note nearby or a general disclaimer on the page. In many countries the law and advertising rules require this.
  • No substitution. Do not hijack other people's links or insert your ID where the reader does not expect it.
  • One destination for everyone. If different visitors need different offers by country or device, do it openly, as geo routing, rather than hiding different content for the review and for people behind one link.
  • Lost parameters. The redirect does not pass on the tags from the original link, and the SubID or click ID never reaches the network. There are conversions but nothing to match them to.
  • A permanent redirect to a temporary destination. A 301 to an offer that will close in a month, and some visitors keep going to a dead URL for a long time.
  • A long chain. A shortener, then a tracker, then another redirect: each link adds delay, and on mobile internet some people close the tab before they reach the merchant.
  • No rel attribute. Search engines may treat affiliate links without rel="sponsored" as an attempt to pass link equity for money.
  • One link for everything. When the same short link sits in an article, a newsletter and a video, you do not know which one makes money. Create a separate link or tag for each placement.
Link cloaking Cloaking (traffic filter)
What changes Only the URL The page shown
Who goes where Everyone to the same place Based on a check of the visit
Main purpose Readability, click tracking, management Filtering bots, fraud, spy tools
Platforms' stance Usually acceptable when the destination matches Showing the review a different page is prohibited
Typical user Blogger, reviewer, newsletter author Media buyer, team, advertiser

The confusion comes from the shared English word "cloaking". In reality these are different tools for different jobs. The traffic filter in affiliate marketing and its limits are covered in cloaking for affiliate marketing.

Where ArtisanClo fits in

ArtisanClo is not a link shortener but a traffic filtering service with a built-in tracker. Still, some link cloaking jobs come naturally to it if you run ad traffic through your own landing page:

  • The URL stays yours. The ad points to your site's address, and the site is connected with a JS tag or a PHP file.
  • Redirect to the offer. An offer can use the Redirect mode (a 302): the visitor goes to the affiliate URL, just as with ordinary masking.
  • Offer link parameters. Rules rename, set and remove tags on the way to the offer: for example, put our {click_id} into the program's sub1 or remove utm_source so it does not go to the network.
  • Clicks and money. The tracker counts clicks, leads, sales, spend and profit and accepts postbacks from affiliate networks; more in what an affiliate tracker is.

The affiliate networks the tracker works with are in the network catalog, and other features are on the features page.

Summary

  • Link cloaking is a short URL on your own domain that redirects to an affiliate link: for readability, management and click tracking.
  • Affiliate links use 302 or 307, without long redirect chains.
  • Tracking is what gives masking its value: tags, SubID, postback.
  • Check the affiliate program's and the platform's terms, disclose that the link is an affiliate link and send every visitor to the same place.

Frequently asked questions

01

How is link cloaking different from website cloaking?

Link masking only changes the URL: everyone who opens the short link lands on the same merchant page. Website cloaking shows different visitors different content based on a check. The first is normal affiliate marketing practice; the second, when the review is shown a different page, is explicitly prohibited by platforms.

02

Which redirect should I use for an affiliate link, 301 or 302?

Affiliate links usually use 302 or 307: the program's destination URL may change, and browsers do not remember a temporary redirect for long. Browsers and search engines cache a 301 as permanent, and a change of destination reaches some visitors with a delay.

03

Do affiliate programs allow link cloaking?

Terms vary. Many programs are fine with a redirect through your own domain, but some prohibit shortening or hiding their links, require the merchant's domain to be visible or ban certain traffic sources. Before masking a link, find the clause about links and traffic in the program's terms.

04

Does affiliate link cloaking affect SEO?

The redirect itself neither raises nor lowers rankings. Search engines ask you to mark paid and affiliate links with rel=sponsored or nofollow, and the redirect folder is often blocked from indexing. Problems start when visitors and the crawler are shown different things; that is cloaking in the search engine sense.

05

Do I need to tell readers that a link is an affiliate link?

In many countries the law and advertising rules require disclosing that a link is an affiliate link if you receive a commission for the click or purchase. Even where it is not mandatory, a short note next to the link builds trust and removes any suspicion of hidden advertising.

Read next

See your traffic for real

Connect ArtisanClo to your site, see who actually arrives from your ads, and why every click got its decision.