Geo-Targeting and A/B Testing Links: A Guide to Smart Redirects
How to route one short link to different destinations by country, split traffic with weighted rotation, run A/B tests, and add mobile deep links — and the priority order that decides which wins.
One ShortlyLink short link doesn't have to point at a single destination. The same URL can send a visitor in Germany to a localized offer, split your remaining traffic 70/30 across two landing pages, or hand mobile users a native app deep link — all decided in the instant before the redirect fires. The catch is that these behaviors don't stack freely: ShortlyLink resolves every click through a strict, exclusive priority chain, and understanding that order is the difference between a link that does what you meant and one that quietly ignores half your setup.
Quick answer
Every ShortlyLink click runs through five targeting stages in order, and the first stage that picks a destination wins — later stages never run:
- Geo rules (by country)
- Weighted rotation (percentage split)
- A/B test (named variants)
- Mobile deep link (iOS/Android with web fallback)
- Original URL (the default)
The most important nuance: weighted rotation and A/B testing are mutually exclusive on the same link. If both are configured, rotation runs and the A/B test is skipped. Pick one per link. Every non-bot click records which country and which variant it belonged to, so you can compare performance in analytics.
How one short link resolves to different destinations
When someone taps go.shortlylink.com/yourcode, ShortlyLink doesn't just look up a stored URL and forward it. It evaluates a chain of targeting rules top to bottom. Each stage asks a single question: "Do I have a destination for this click?" The moment one stage answers yes, resolution stops and the visitor is sent there with an HTTP 302 redirect.
That "stop on first match" behavior is what makes the order matter so much. A country rule that matches will always beat a rotation split. A rotation split will always beat an A/B test. The chain is exclusive by design — it's a priority list, not a set of layers that combine.
Here's the full chain, and when each stage earns its place:
| Stage | What it does | When to use it |
|---|---|---|
| 1. Geo rules | Sends visitors from specific countries to specific destinations | You have country-specific offers, compliance rules, or localized pages |
| 2. Weighted rotation | Splits traffic across multiple URLs by percentage (e.g. 70/30) | You want to load-balance or distribute across several live destinations |
| 3. A/B test | Routes clicks to named variants and tracks each one separately | You want to compare two or more pages and read results per variant |
| 4. Mobile deep link | Opens an iOS/Android app (with a web fallback) | Your offer has a native app you'd rather open than a mobile web page |
| 5. Original URL | The plain destination you set when you created the link | The default whenever no earlier stage matched |
Because geo sits at the top, a matching country rule short-circuits everything below it — including rotation, A/B, and deep links. Keep that in mind when a link "isn't rotating" for a particular visitor: check whether a geo rule caught them first.
How to set geo rules by country
Geo targeting is the highest-priority stage, so it's the right tool when a visitor's country should override every other behavior. ShortlyLink derives country from the click's IP address using GeoIP, then checks your rules before anything else runs.
Typical reasons to reach for geo rules:
- Localized offers. Send US traffic to your
.comoffer and UK traffic to a.co.ukequivalent. - Affiliate program coverage. Route visitors to the network that actually pays out in their region, and everyone else to a global fallback.
- Compliance and availability. Keep traffic away from a page that isn't legal or available in certain markets.
You define rules per country. A visitor whose country matches a rule is sent to that rule's destination immediately. A visitor from a country with no rule falls straight through to the next stage in the chain — rotation, then A/B, then deep link, then your original URL. So geo rules don't have to be exhaustive; they're targeted exceptions layered on top of whatever default behavior the rest of the chain provides.
One subtlety worth remembering: geo here is country-level for routing decisions. Analytics goes finer — region and city — but city-level data is always keyed with its country, so "London, UK" and "London, CA" never get merged.
How weighted rotation works (and why 70/30)
Weighted rotation distributes clicks across several destination URLs by percentage. You might send 70% of traffic to page A and 30% to page B, or split evenly across three URLs, or any weighting you choose that adds up to 100%.
Rotation is the second stage in the chain, so it only runs for visitors that no geo rule claimed. When it does run, ShortlyLink picks a destination according to your weights and forwards the click.
Use rotation when you care about distribution, not comparison:
- Load-balancing across multiple live landing pages or offer mirrors.
- Spreading volume across several affiliate destinations to respect caps or throttles.
- Gradual rollout — send a small slice of traffic (say 10%) to a new page while the bulk stays on the proven one.
The key thing rotation is not built for is clean experimentation. It splits traffic, but its job is delivery, not measurement. When you want to know which page actually converts better, you want the next stage instead.
How A/B tests work with named variants
A/B testing routes clicks to named variants and tracks each variant separately. Instead of an anonymous percentage split, you get labeled arms — "control" and "new-hero", or "variant-a" and "variant-b" — and every click records which variant it landed on.
That per-variant click tracking is the whole point. Because the variant name rides along with each click into analytics, you can compare variants directly: clicks, and downstream conversions and revenue, broken out by arm. That's what turns a split into an experiment you can actually read.
A/B testing sits at stage three, below rotation. Which leads to the single most important rule on this page.
Weighted rotation and A/B testing are mutually exclusive — rotation wins
On any given link, weighted rotation and A/B testing cannot both be active. If you configure both, rotation runs and the A/B test is silently skipped — rotation sits higher in the chain and takes the click first.
This trips people up. You set up a careful two-variant experiment, but a leftover rotation config on the same link means every click resolves through rotation and your A/B variants never get chosen. In analytics you'd see traffic flowing but no variant breakdown, because the A/B stage never executed.
The rule to internalize: pick one behavior per link.
- Want to measure which page wins? Use an A/B test and leave rotation off.
- Want to distribute traffic by percentage? Use rotation and skip A/B.
If you genuinely need both split-and-measure behaviors for different purposes, use two separate links rather than trying to stack them on one.
When to use rotation vs A/B testing
Both split traffic, so the choice comes down to intent:
- Use weighted rotation when the goal is distribution. You already trust the destinations and just want to control how much traffic each one gets — load-balancing, capacity caps, mirrors, or a cautious percentage rollout.
- Use A/B testing when the goal is comparison. You have a hypothesis about which page performs better and you need named, separately-tracked variants to settle it with data.
A quick gut check: if you'd describe what you're doing as "sending X% here and Y% there," that's rotation. If you'd describe it as "testing whether this page beats that one," that's A/B. And remember you can't do both on one link — rotation would win anyway.
What about mobile deep links and the original URL?
If a click clears geo, rotation, and A/B without a match, ShortlyLink checks for a mobile deep link. This lets you open a native iOS or Android app instead of a mobile web page, with a web fallback for anyone who doesn't have the app or is on desktop. It's the natural fit when the offer you're promoting has an app experience that converts better than its mobile site. Deep linking pairs especially well with affiliate offers — there's a deeper walkthrough in deep linking for affiliate offers.
If none of the earlier stages fired, the visitor simply goes to the original URL — the destination you set when you created the link. It's the safety net at the bottom of the chain, which is why every link always has somewhere to send a click even with no advanced targeting configured at all.
How variant and geo data show up in analytics
Targeting is only half the value; the other half is seeing what happened. ShortlyLink captures a rich record on every click, and two fields matter most for smart redirects:
- A/B variant — which named arm the click was routed to. This is what lets you compare variant performance side by side.
- IP-derived geo — country, region, and city, so you can see how each market behaved and validate that your geo rules are catching the right traffic.
Alongside those, each click also records a unique-visitor flag, device/browser/OS, referrer, UTM parameters, and the traffic source (a real link click vs. a QR scan vs. a bio tap). You can slice all of this in custom dashboards and export it to CSV or JSON when you want to analyze it elsewhere.
Two details protect the integrity of what you're reading:
- Bot traffic is excluded from stats automatically. Every click is scored for fraud and bot signals, and detected bots are kept out of your numbers — so a variant's click count reflects humans, not scrapers. (A practical side effect: testing a link with
curlwill trip bot protection and get blocked, so use a real browser to sanity-check redirects.) - No cookies or localStorage are used for click tracking. The visitor fingerprint is a one-way server-side hash, which keeps unique-visitor and variant tracking working without dropping anything on the visitor's device.
If you're routing affiliate traffic through these variants, you'll want conversions attributed back to the right arm too — that's covered in how to track affiliate conversions.
Putting it together
Smart redirects reward a little planning. Decide, per link, what job it's doing:
- Add geo rules only where a country genuinely needs a different destination — they override everything below.
- Choose either rotation or A/B, never both — rotation for distribution, A/B for measurement.
- Add a mobile deep link if the offer has an app worth opening.
- Rely on the original URL as your guaranteed fallback.
Because the chain is exclusive and ordered, you rarely need more than one or two stages on a single link. Match the stage to the goal, keep rotation and A/B apart, and read the variant and country breakdowns to see how each redirect performed. You can explore the full targeting toolkit on the features page.
Ready to build your first smart redirect? Start free at /register — no credit card, during ShortlyLink's beta.