Affiliate marketing remains one of the best introductory ways to make money from a blog, and you don’t need massive traffic to pull it off. It’s typically higher paying and more effective than traditional advertising, and it scales well as your traffic and niche grow. The global affiliate marketing industry was valued at over $17 billion in 2024 and is projected to reach $27.78 billion by 2027 - so the ceiling is very real, even if it takes years of consistent work to get there.
Affiliate links are tricky to use properly, however. You need to mark them clearly, both because of FTC disclosure requirements and because Google expects proper nofollow and sponsored attributes on monetized links. Thankfully, one thing you can do to help manage your links more effectively - and potentially improve click-through rates - is cloaking them.
Cloaking an affiliate link means cleaning up its appearance and routing it through a redirect you control. According to a 2024 Statista report, 68% of users avoid clicking URLs with visible tracking parameters, fearing phishing or privacy issues. And users are up to 30% more likely to click a branded, clean URL than a raw affiliate link. Some forms of cloaking are black hat and can hurt your site, but if you cloak the right way, you can stay SEO-friendly while still getting that bump in click-throughs and profits.
One important caveat before we dive in: Amazon Associates strictly forbids cloaking that obscures the fact a link goes to Amazon. Always check your affiliate network’s terms of service before cloaking. The FTC also requires you to clearly disclose affiliate relationships regardless of how you format the link - cloaking does not remove your disclosure obligations.
- 68% of users avoid URLs with tracking parameters; clean, branded affiliate links can increase click-through rates by up to 30%.
- Proper link cloaking protects commissions from hijacking, which costs affiliates an estimated 15% of earnings annually.
- Using a redirect folder with robots.txt exclusion and PHP scripts lets you manage all affiliate links from one central location.
- Amazon Associates strictly forbids cloaking that obscures Amazon destinations; always check affiliate network terms before cloaking.
- WordPress plugins like ThirstyAffiliates and Pretty Links handle cloaking without coding, making the process accessible for non-technical users.
Reasons to Cloak Affiliate Links

Cloaking is a tool, and like any tool, people use it for both good and bad reasons. There are some legitimate reasons to cloak your links, but there are also some that just signal spam marketing intent.
If you’re hiding the true nature of your links because otherwise no one clicks them, you’re probably spamming and cloaking won’t save you.
If your links redirect users through several ad networks and offer pages before reaching their destination, that’s clearly harmful to user experience and Google will not be fooled. This makes very little money and you aren’t hiding anything from Google’s crawlers.
If you’re sending bots to one destination and human users to another, Google considers this malicious cloaking and will penalize you. It’s detectable, it’s against webmaster guidelines, and it will hurt you in the long run.
So what are the legitimate reasons to cloak your links through an outbound redirect?
- It helps protect your commissions from link theft. A 2025 Affiliate Summit report estimates that 15% of affiliate earnings are lost annually to link hijacking. Cloaked links with redirects you control are significantly harder to strip or replace.
- It allows you to customize the appearance of your links. Users hover over links to preview the destination URL and use that to decide whether to click. Clean, branded URLs convert better - up to 30% better, according to Hostinger data. A cloaked link like example.com/go/toolname performs better than a raw affiliate URL full of tracking strings.
- It allows you to more easily manage your links at scale. If a tracking code changes, an offer expires, or an affiliate network shuts down, you only need to update the redirect in one place rather than hunting down 50 instances across your site. This alone is worth the setup time.
- It makes nofollowing simpler. The FTC and Google both require that affiliate links carry rel=”nofollow sponsored” attributes. Using a redirect-based system makes this easier to standardize across your site. Most affiliate links can hurt your SEO if this isn’t handled correctly.
You might have seen me refer to this as an outbound redirect rather than a cloak. The cleaner link appearance is really just a secondary benefit - the primary value is link management and protection. This method works best on self-hosted sites you control directly. If you’re on WordPress, there are plugins that handle all of this without touching a single line of code (more on that below).
The Process

The first thing you want to do is create an outbound folder. This will be a folder in the root directory of your site, usually just called /go/ or /out/ or something similar. In practice the name doesn’t matter much, though /go/ has become a popular convention as it looks clean and intuitive. In practice this means www.example.com/go/. You can create several subfolders - one per affiliate network - if you want more granular organization, but one folder is sufficient for most sites.
The second step is to hide that folder from Google and other crawlers. Since it will contain nothing but redirect scripts, there’s no reason for it to be indexed. To do this, open your robots.txt file in your root directory. If you don’t have one, create a plain text file named robots.txt and add the following:
User-agent: *
Disallow: /cgi-bin/
Disallow: /tmp/
Disallow: /out/
Disallow: /go/
Save it and place it at your root so it’s accessible at www.example.com/robots.txt. Remove any lines for folders that don’t exist on your site. You can read more about robots.txt customization here. And as always - never type “Disallow: /” and save, or you’ll block your entire site from being crawled.
The third step is to create a PHP redirect script. The classic Joost de Valk script that was widely recommended for years is now somewhat dated, and frankly there are better options in 2026. If you’re comfortable in PHP, a clean 301 or 302 redirect setup with a simple CSV or array-based lookup table is easy to maintain. A 301 is permanent (passes some link signals), while a 302 is temporary and is generally preferred for affiliate redirects since the destination may change.
Your redirect script will do the following:
- Accept a link identifier from the URL (e.g., /go/toolname)
- Look up the corresponding destination URL from your reference file or array
- Redirect the user with the appropriate status code
- Handle fallbacks gracefully - if an ID doesn’t match anything, redirect to your homepage rather than throwing a 404
The process for adding a new affiliate offer will look like this:
- Get your affiliate link from the network - something like www.affnetwork.com/ref=yourID
- Add it to your reference file or array: “toolname” => “www.affnetwork.com/ref=yourID”
- Use www.example.com/go/toolname as the link anywhere on your site. It looks clean, branded, and internal.
To make your URLs look even cleaner, use your .htaccess file (Apache servers) to rewrite the URL so it doesn’t show query strings. This turns /go/?id=toolname into /go/toolname, which looks far more trustworthy. If you’re running NGINX, you’ll need to use a server block rewrite rule instead - the logic is the same, just different syntax.
Your .htaccess entry for the /go/ folder will look something like this:
RewriteEngine On
RewriteRule ^go/([a-zA-Z0-9_-]+)$ /go/index.php?id=$1 [L,QSA]
This is a widely-used, clean pattern that hides the query string from users while still passing the ID to your PHP script.
As always, remember that cloaking is not a way to deceive your audience. You still need to disclose affiliate relationships clearly on your pages, per FTC guidelines. Clean links and proper disclosure are not mutually exclusive - in fact, they work better together.
Alternative Methods: WordPress Plugins

If any of the above felt too technical, WordPress plugins handle all of this for you - and in 2026, they’re more capable than ever.
- ThirstyAffiliates remains the gold standard for affiliate link management on WordPress. It handles cloaking, categorization, automatic keyword linking, click tracking, and geolocation redirects. The pro version is well worth it for serious affiliate sites.
- Pretty Links is a strong alternative, especially if you want a cleaner interface and more general redirect management beyond just affiliates.
- AAWP (Amazon Affiliate WordPress Plugin) is worth mentioning specifically for Amazon Associates, since it builds compliant product displays without cloaking Amazon URLs - keeping you within Amazon’s terms while still looking polished.
- URL shorteners like Bit.ly can technically work but are not recommended. Google follows shortened URLs, many users run unshortener tools, and they provide no management layer you control. They’re not a real solution for affiliate link management.
Regardless of the method you choose, managing and cleaning up your affiliate links is a worthwhile investment. With 68% of users avoiding URLs with tracking parameters, and cloaked links showing up to a 25% higher click-through rate in email campaigns alone, the impact on your bottom line is measurable. Clean links, proper disclosures, and a system you can manage at scale will serve your affiliate strategy far better than scattering raw tracking URLs across your content and hoping for the best.
2 responses
Thoughtful replies only - we moderate for spam, AI slop, and off-topic rants.
When this article was written?How about fb or bing? Can i use this type of cloaker with them?
Isn’t this clearly a violation of Amazon’s ToS?