Geographic Routing
Geographic routing sends visitors from chosen countries to a different address. Recommend a book once, and listeners in the US go to amazon.com while listeners in the UK go to amazon.co.uk. Everyone else goes to the link’s own address.
It’s part of the Outlinks add-on and works on tracked links only.
Before You Start
Country routing needs Benecaster’s GeoIP lookup, which is off until you set it up. Go to Benecaster → Settings → Tools → GeoIP Database, switch it on and add a free MaxMind license key; see Settings Reference → GeoIP Database for the steps. Until it’s on, every visitor gets the link’s own address, whatever rules you set.
The lookup runs on your own site from a local database. No outside service is asked about each click.
If your site sits behind Cloudflare or another proxy or CDN, your site sees the proxy’s address rather than the visitor’s, so every visitor appears to be in the proxy’s country and country rules send people to the wrong place. Check with your host before relying on country routing.
Setting Up Country Rules
- Open an episode that cites the reference in Benecaster → Episodes, and go to its References tab.
- If the reference isn’t tracked yet, click → Track and create its link (see Tracking a Reference).
- Click the reference’s click count to open the link’s settings.
- Tick Geo Routing.
- Click + Add a country, then fill in the row:
- Country — choose from the list.
- Destination URL — where visitors from that country go. Required.
- Affiliate URL for this country (optional) — when set, visitors from that country go here instead.
- Add a row for each country you need. Each country can have only one rule per link. Use Remove to delete a row.
- Click Save settings.
The rules belong to the link, so they apply on every episode that cites the reference.
To switch routing off, untick Geo Routing and click Save settings. That removes every country rule on the link; you’d need to add them again to switch it back on.
Where Each Visitor Goes
- A visitor from a country with a rule goes to that rule’s affiliate URL if it has one, otherwise to the rule’s Destination URL. The link’s own affiliate URL does not apply to them.
- Everyone else, and every visitor while GeoIP is off or can’t place them, goes to the link’s affiliate URL if it has one, otherwise to the reference’s URL.
- An expired link sends everyone to its fallback, country rules included. See Link Expiry.
- Parameters added to the
/go/address are passed on to the country’s address too. See Passing On URL Parameters.
A country rule’s affiliate URL counts as an affiliate link for the affiliate disclosure.
Countries in Your Reports
While GeoIP is on, Outlinks records the visitor’s country on every counted click, whether or not a rule matched. It appears in the Country column of the Outlinks Click Log sheet under Benecaster → Settings → Your Data. Clicks made while GeoIP is off, or that the database can’t place, have no country.
The country list includes Kosovo, which the GeoIP database can return.
Checking Country Addresses
Link Health checks each country rule’s addresses along with the link’s own, and a broken one shows the link as Broken.
When Outlinks Is Switched Off or Your License Lapses
The link keeps working, but every visitor goes to the reference’s URL. Country rules are kept and apply again once Outlinks is back on. See When Outlinks Is Switched Off or Your License Lapses.
For Developers
benecaster_outlinks_before_redirectreceives the visitor’s country code and the final address after country rules are applied.
See Also
Need this built rather than just documented? See our services →
Last updated