← All use cases

Affiliate marketing

Affiliate link cloaking, without a SaaS in between

One WordPress plugin for branded /go/<slug> links on your own domain. A click count per link is free; referrer, country and device reports, keyword auto-linking and CSV import are Pro.

What you’re building

A self-hosted affiliate-link manager that gives you clean branded URLs and counts every click on your own server. In Pro it also shows which pages send the clicks. No third-party redirect service. No monthly SaaS fee.

It works with any affiliate network, because all the plugin needs is the destination URL the network gives you. Everything runs inside your WordPress install.

Why people search for this

The default affiliate link is ugly and untrackable:

https://www.amazon.com/dp/B08L5TNJHG?tag=yoursite-20&linkCode=ll1&...

You can’t read it, and it looks like spam when you share it on social. A long URL is also easy to break when someone copies and pastes it.

Other link plugins and hosted trackers cover the same ground, some for a fee. Check each vendor’s own site for what it offers today. In WB Ad Manager the core does branded links and click counts for free, with no click quota.

What cloaking and de-cloaking mean

Cloaking means giving a long affiliate URL a short, branded address on your own domain. The reader clicks yoursite.com/go/slug. Your site answers with a redirect, and the browser moves on to the real destination.

De-cloaking is the reverse, and the word has two meanings. One is a reader or a tool following a short link to see where it goes. The other is a site owner swapping cloaked links back for direct URLs.

What a visitor sees

Before the click, the visitor sees your short link on the page, with no parameters in sight. After the click, the browser lands on the merchant and the address bar shows the real destination, tracking parameters included. The short URL does not stay in the address bar.

So cloaking tidies the link before the click. It does not hide where it goes. Anyone can find the destination by clicking or by reading the redirect in the browser’s network tools.

What a network sees

The network sees an ordinary visit that arrives with your affiliate parameters on the URL. It has to, because that is how it credits you. Cloaking does not hide your affiliate ID from the network.

Our de-cloaking guide walks through how to check your own links the way a stranger would, and what is link cloaking covers the basics.

The setup in three minutes

  1. Install + activate WB Ad Manager (free).
  2. Add your first cloak. Links > All Links > Add New Link. Paste the long affiliate URL. Set the slug (e.g. coursera-react). Done. Your branded link is yoursite.com/go/coursera-react.
  3. Drop the link in a post. Paste the short URL anywhere a link is accepted. The plugin counts every click on the link.

Setting it up properly, step by step

  1. Choose your prefix first. In Settings, the Link Cloaking section holds the prefix (go by default) and the inactive-link action. Decide both before you publish, because the prefix ends up in every post.
  2. Create a category per programme. Links > Categories groups links by merchant or network.
  3. Add each link. Links > All Links > Add New Link. The name is a private label that visitors never see. Paste the destination with its affiliate parameters, set the slug, and leave the redirect on 307 unless you have a reason to change it.
  4. Tick the boxes that matter. Nofollow is ticked for new links. Sponsored is not, so tick it on every affiliate link.
  5. Set an end date on promotions. An expired link returns a 404 unless you chose a fallback in Settings. The expiry guide shows the pattern.
  6. Place the link. Use the link shortcode when you want custom anchor text and the rel attributes printed. Paste the short URL when you only need a plain link.

What you see in the dashboard

In the free plugin, the Links list shows a running click total for every cloak, and you can sort by it. With Pro’s advanced link analytics you also get:

  • Top referrers so you know which post drives clicks.
  • Geographic split for region-restricted offers.
  • Device split so you don’t waste mobile-only offers on desktop traffic.

If an offer’s click total suddenly climbs, you’ll see it before the merchant’s report does.

A normal week of running it

Once the setup is done, upkeep is small. Most weeks look something like this:

  • Add links as you write. Each new review or roundup gets its links created before you hit publish.
  • Sort the list by clicks. The Clicks column in Links > All Links shows which links people use.
  • Check expiring offers. Extend or retire links whose end date is close.
  • Match against the network. Once a month, compare your click totals with each network’s report.

The AdSense conflict you don’t want to hit

AdSense policy is about AdSense ads and how clicks on them are produced. Cloaked affiliate links are a separate matter. WB Ad Manager sends a plain temporary redirect: nothing is injected into the page and no interstitial appears between the click and the merchant. Your AdSense units are not touched. Read the AdSense program policies for your own pages, because the rules are Google’s to change.

What you can measure

The free plugin keeps one number per link: a running click count, shown as a sortable Clicks column. It records the click on your server when the redirect runs, so it does not depend on a script loading in the reader’s browser.

The count does not filter bots or repeat visits, so treat it as real clicks plus some noise.

What you want to knowFreePro
Clicks per linkYesYes
Which page or post sent the clickNoYes
Country splitNoYes
Device splitNoYes
Whether the destination still worksNoYes

Clicks are not commissions. Sales, conversion rates and payouts come from the affiliate network’s own dashboard. Free versus Pro is laid out in full on the free versus Pro page.

Stop manually editing 200 posts when a merchant changes their URL

When Coursera rebrands a course URL (or Amazon’s ASIN changes), you change ONE cloak entry. Every post that linked to /go/coursera-react now points to the new destination automatically.

The first time you have to retire a dead affiliate link across 300 posts without the cloaker, you’ll wish you started with it.

What it earns, and how

The plugin earns nothing by itself. Your income is the commission the network pays when a reader buys. The plugin cuts the effort of keeping those links working.

A branded link you can repoint in one place saves hours when a merchant moves a page. An end date stops a dead promotion sending readers to an error. In Pro, keyword auto-linking links a phrase wherever it appears, within the limits you set.

No screen in the plugin totals affiliate income. The Pro Revenue screen covers what advertisers paid for ads, not commissions, so keep those in your network reports.

When to upgrade to Pro

The free plugin handles cloaking, click tracking, categories and expiry dates. Pro adds:

  • Keyword auto-linking. Define keywords once and every mention across your posts links to the cloaked URL automatically.
  • Link scanner. Scans your posts for external links already in your content, raw affiliate URLs included, so you can bring them under a cloaked link.
  • CSV bulk import. Upload a CSV with a name and a destination URL per row, and optionally a slug, and import many links in one pass.
  • Broken-link checker. Flags cloaked links whose destination has stopped working.
  • Advanced link analytics. Referrer, country and device breakdowns for each link.

Many affiliates start on the free plugin. Upgrade when auto-linking and the scanner save you more time than the Pro licence costs. Pro is a paid yearly licence, and the pricing page has the details.

WB Ad Manager Pro has a CSV importer, and it does not read ThirstyAffiliates or Pretty Links data directly. Export your links from the old plugin as a CSV, rearrange the columns so the header row uses the importer’s names, then upload the file. The header row needs name and destination_url, and may also carry slug, link_type, nofollow, sponsored and description. A row whose destination URL already exists can be skipped or used to update the existing link.

The cloaking prefix (/recommends/, /go/, or your own) is configurable, so you can keep the prefix your old backlinks use. Test the migration on a staging copy first.

Disclosure and rules that stay with you

The plugin gives you the tools, but the duties are yours. It does not add rel="sponsored" for you, and there is no setting that makes it the default. There is also no shortcode that writes an affiliate disclosure.

  • Disclose near the link. Say plainly, close to the recommendation, that you earn a commission. Write that line yourself, in your own words.
  • Tick sponsored on every affiliate link. Then use the link shortcode so the rel attributes print on the page.
  • Read each programme’s terms. Networks set their own rules on redirected and shortened links, and some restrict them. Confirm yours allow a redirect on your domain.
  • Mention what you collect. Pro’s country breakdown uses an IP lookup with a geolocation service. Say so in your privacy policy.

Our guide to affiliate link disclosure goes through the wording.

Common pitfalls

  • 301 vs 302 vs 307. Use a temporary redirect for affiliate cloaks. 301 gets cached hard and makes a changed destination slow to take effect. WB Ad Manager defaults to 307, and you can pick 301, 302 or 307 per link.
  • /go/ slug clashing with other plugins. If you already have a plugin reserving /go/, change the WB Ad Manager prefix to /out/ or /aff/ in Settings.
  • Nofollow + sponsored. On each link there is a checkbox for rel="nofollow" and one for rel="sponsored". New links come with nofollow ticked and sponsored not ticked, so tick sponsored on every affiliate link. Google asks for it on paid and affiliate links.
  • robots.txt allow. Make sure /go/* isn’t blocked in robots.txt. It rarely is by default, but theme migrations have been known to introduce odd rules.

Useful integrations

  • Yoast / Rank Math - the rel attributes you set on a link are printed when you place it with the link shortcode (and on Pro keyword auto-links). A bare short URL pasted into the editor carries no rel from the plugin.
  • Google Analytics 4 - the plugin sends no GA4 event for cloaked clicks. The click count lives in WordPress, so compare it with your network’s report rather than expecting it in GA4.
  • CDN or page cache - each redirect is sent with no-cache headers, but your own cache rules still apply. Test a /go/ link with your cache switched on.

What WB Ad Manager does not do here

Knowing the limits saves a surprise later. For this setup, the plugin does not:

  • hide the destination after the click, because the address bar shows it once the redirect lands
  • add the sponsored attribute or any disclosure text on its own
  • filter bots or repeat visits out of the click count
  • count newsletter opens or wrap newsletter links in tracked URLs, since a short link in an email only counts its own clicks
  • pull commissions or sales from an affiliate network

Your first 30 days

  1. Days 1 to 3. Set the prefix and inactive-link action, and create your categories.
  2. Days 4 to 10. Cloak the links on your ten most visited affiliate pages, with sponsored ticked.
  3. Days 11 to 17. Swap the raw URLs in those posts for short links or the shortcode, and click each one.
  4. Days 18 to 24. Write your disclosure line and check each programme’s rules on redirects.
  5. Days 25 to 28. Compare click counts with network reports and find links that get clicks but no sales.
  6. Day 30. Decide whether the scanner and auto-linking would save you time.

Where it sits with the other plugins

WB Ad Manager is one of several separate, optional plugins from the same team. They run on one WordPress site and one login, and you install, host and update each one yourself.

The connections that exist are specific. The free plugin places ads in BuddyPress, bbPress and Jetonomy positions, and Pro adds a BuddyPress integration that puts the advertiser portal on member profiles. Cloaked links work anywhere you can put a link.

BuddyNext (community), Jetonomy (forum and Q&A), Learnomy (courses), Listora (directory), WP Career Board (job board), WB Gamification (points and badges), and the BuddyX Pro and Reign themes run alongside it on the same site. We make no claim of a built-in link between them and the link cloaker. A publisher with a community, a directory or a job board has audiences worth selling space against, and direct sponsor ads is the next step once affiliate links are tidy.

If you are comparing tools first, see the ThirstyAffiliates alternative page and the link cloaking overview.

Ship checklist

  • Plugin installed and activated, with the Links menu showing in the admin
  • Default slug prefix chosen (/go/, /out/, or branded like /best/)
  • nofollow ticked (the default) and sponsored ticked for every affiliate link
  • AdSense placements on same page tested (no policy conflict)
  • Top 10 most-trafficked affiliate posts updated to use cloaked URLs
  • Migration from old cloaker (if any) verified - no 404s on existing backlinks

Then publish, sleep, watch the dashboard tomorrow morning.

Common questions

It usually means one of two things. Either someone follows a short link to find out where it really goes, or a site owner removes cloaked links and goes back to direct URLs. Cloaking only tidies the address before the click. After the click the browser shows the real destination, so a cloaked link is never fully hidden.

Does the short URL stay in the address bar after a click?

No. The plugin sends a standard redirect, so the browser ends up on the merchant’s page and the address bar shows the real destination with its parameters. The short link is only what the reader sees on your page before clicking. Anyone can read the destination from the redirect or a link checker.

Is the click count in the free version accurate?

It is a real server-side count of requests to the short link, but it does not filter bots or repeat visits, so it includes some noise. It is good for comparing your links against each other. Use your affiliate network’s report for confirmed clicks, sales and commissions.

Does the plugin add the sponsored attribute automatically?

No. Each link has a nofollow box, ticked by default for new links, and a sponsored box that starts unticked. You need to tick sponsored on every affiliate link yourself. The attributes print on the page when you place the link with the link shortcode, so use it for affiliate links.

Pro has a CSV importer, but it does not read another plugin’s data directly. Export your links as a CSV, rearrange the columns to use name and destination_url, plus an optional slug, then upload the file. The free plugin has no import, so there you would add links by hand.