How affiliate cloaking works
Cloaking is just a 301 or 302 redirect that you control. The user clicks yoursite.com/go/airtable; your server (or plugin) immediately redirects them to the long affiliate URL; tracking still fires. From the user's perspective, they clicked a link on your site and ended up on the merchant. From the affiliate network's perspective, the click came through your tracking link normally.
The redirect can live in many places:
- A WordPress plugin like Pretty Links or ThirstyAffiliates
- A custom URL shortener like Rebrandly or Bitly Custom Branded Links
- A static
_redirectsfile (Netlify, Cloudflare Pages) - An Apache
.htaccessfile or NGINX redirect rule - A Cloudflare Worker (if you want logic, A/B testing, or geo routing)
Pick whatever matches your stack. The redirect mechanism is identical underneath.
Why affiliates cloak
Three reasons, in descending order of importance:
- Click-through rate. A clean branded URL gets meaningfully more clicks than a 200-character tracker URL. Users who see the destination domain feel safer clicking. Users who see
?affid=12345&sub=tt%2Bxx&...hesitate or right-click to inspect. - Link rot protection. If a merchant's affiliate program shuts down or you switch to a competing offer, every cloaked link in your archive updates the moment you change the redirect destination. Without cloaking, you're hand-editing dozens of posts.
- Tracking flexibility. Routing, A/B testing two offers against each other, blocking certain referrers, or geo-targeting all happen at the redirect layer. Hard to do with raw affiliate links.
The FTC line — and why most cloaking is fine
The single biggest misunderstanding in affiliate marketing: cloaking the URL is fine. Cloaking the relationship is not.
The FTC's concern isn't whether the URL is short or long. It's whether the user understands they're clicking an affiliate link. That requires a clear disclosure ("This post contains affiliate links — I may earn a commission") near the link, regardless of whether the link itself is cloaked.
Concrete examples:
- Compliant: Cloaked link
yoursite.com/recommends/x, with a visible disclosure at the top of the post. - Compliant: Raw affiliate link
network.com/click?..., with a visible disclosure. - NOT compliant: Either link type without a disclosure.
For the full breakdown, see the Compliance Playbook.
Tools and configurations
WordPress
Pretty Links and ThirstyAffiliates are the two dominant plugins. Both let you create branded short URLs (yoursite.com/go/x), categorize them, track clicks, and swap destinations centrally. ThirstyAffiliates leans more toward affiliate-specific features (categorization, automatic linking from keywords); Pretty Links is broader and slightly faster.
Static sites (Cloudflare Pages, Netlify, Vercel)
Use the platform's redirect mechanism. Cloudflare Pages and Netlify both honor a _redirects file at the project root:
/recommends/tool https://network.com/click?aff=...&dest=... 301
Vercel uses a vercel.json with a similar pattern. Edit the file, redeploy, done.
Third-party services
Rebrandly, Bitly Custom Branded Links, and Short.io all let you create branded short URLs without managing your own redirects. Useful if you don't run a WordPress or static site, or if you want analytics built in.
Watch-outs
- Amazon Associates: their operating agreement is restrictive about hiding affiliate URLs. Most affiliates use cloaking everywhere except Amazon links, where they leave the raw URL or use Amazon's own short links.
- Some networks scrub cloaked clicks. Rare but possible. Test by clicking your own cloaked link and checking it shows up in the network dashboard.
- Avoid double redirects. If your cloaked URL redirects to a tracker URL that itself redirects, you're stacking latency and potentially losing tracking. Single 301 to the network's tracker URL is the clean pattern.