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.
What link cloaking means in affiliate marketing
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.
Why hide affiliate 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.
How to cloak affiliate links step by step
The order is the same whatever you use: a site plugin, a link shortening service or your own redirect.
- 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. - Use clear names.
/go/delonghi-coffee-machineis better than/go/123: the URL shows where it leads and is easy to find in a report. - Paste the full affiliate link, with the affiliate ID and a SubID tag that shows the source page in the network's report.
- Choose the redirect type: 302 or 307 for affiliate links.
- Mark links on the page with
rel="sponsored"and add a note to the reader that the link is an affiliate link. - 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.
- 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.
Short affiliate links and click tracking
On its own, masking is just a redirect. The value appears when tracking is added.
- 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.
- 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.
- 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.
Common link cloaking mistakes
- 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 vs traffic cloaking
| 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'ssub1or removeutm_sourceso 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.



