Affiliate link redirects
How to hide (cloak) affiliate links with local redirects
Important Note for Amazon Associates
Using local redirects for Amazon affiliate links may violate the Amazon Associates Program Policies. Enable link cloaking for Amazon only if you understand and accept the risks. Many publishers prefer direct (non-cloaked) links for Amazon.
What Are Local Redirects?
Local redirects (also known as link cloaking) let you replace long, messy affiliate URLs with clean, branded links hosted on your own site.
Example:
https://example.com/go/polymaker-polyterra-pla-175-black-ab12cd/
When a visitor clicks the clean link, your site instantly redirects them to the merchant’s affiliate URL.
Benefits
Cleaner, more trustworthy links — human-readable, branded URLs can improve click-through rates (CTR).
Consistent site-wide structure — customize your redirect prefix and status codes for uniformity.
Light obfuscation — can hide affiliate parameters from basic crawlers (not intended for SEO manipulation).
Ad-block resilience — some simple filters may be bypassed (advanced blockers can still detect redirects).
Analytics support — works seamlessly with Click Statistics and GA4 event tracking.
How to Enable Link Cloaking
1. Enable per Module
Go to Content Egg → Modules.
Choose your desired module.
Set Link Cloaking to Enabled.

Each module can have different settings, allowing you to follow each affiliate network’s policy.
2. Wait for Indexing
After enabling, Content Egg will index all existing product links in the background via WP-Cron.
On large sites, this may take a few minutes.
Ensure that WordPress Cron is enabled and running.
3. Configure Redirect Behavior (Global)
Go to Content Egg → Settings → Frontend and set:
Redirect Status Code – Choose 301, 302, or 307.
Redirect Prefix – Default is
go
, but you can userecommend
,visit
,deal
, etc.
After making changes, purge any caches or CDN to ensure your new links work immediately.
Choosing the Right Redirect Code
302 (Found)
Common and safe for temporary redirects.
✅ Affiliate links
307 (Temporary Redirect)
Similar to 302, preserves HTTP method strictly.
✅ Affiliate links
301 (Moved Permanently)
May pass link equity, but risky for affiliate use.
⚠️ Not recommended
Troubleshooting & FAQ
Why do some links still appear direct?
Indexing may still be running — give it a few minutes.
Ensure Link Cloaking is enabled for that module.
Confirm that WordPress Cron is active.
Clear your site and CDN caches.
My clean link returns a 404 error.
Go to Settings → Permalinks and click Save Changes (this flushes rewrite rules).
Then, purge your caches/CDN again.
What’s the 6-character suffix in the slug?
It’s a deterministic fingerprint that ensures uniqueness and stability. It does not contain personal data.
Does cloaking bypass ad blockers?
Not completely. Cloaked links may avoid simple domain-based filters, but advanced ad/tracker blockers can still detect redirects.
Tips to reduce blocking:
Use neutral prefixes (e.g.,
/visit/
,/deal/
) instead of/go/
or/out/
.Avoid terms like affiliate, ref, or track in your HTML.
Last updated