Docs

Geo Targeting

2 min readUpdated November 10, 2026

Geo targeting shows or hides a link depending on the visitor’s country. Country tags put the visitor’s country into your text. Use them for local shops, regional offers and links that only work in some countries, without separate bio pages per market.

A link label with the {country} tag filled in for the visitor
  1. Click the Geo targeting (globe) button in the link’s toolbar.
  2. Under Show this link, choose:
    • In all countries: no targeting (default).
    • Only in selected countries: only visitors from these countries see it.
    • Hide in selected countries: everyone except visitors from these countries sees it.
  3. Search for countries and click them to add. Selected countries appear as chips; click × to remove one.
  4. Click Update.
The geo panel for a link with show in all, only in or hide in selected countries

A dot on the globe button means targeting is on for that link.

Country tags#

Type these into a display name, subtitle, bio or link label. Each visitor sees their own country.

Tag Becomes
{country} The country name in the page’s language. Free shipping to {country} becomes Free shipping to Kuwait.
{country_code} The two-letter code. Shop {country_code} becomes Shop KW.

Country names come from your server’s PHP language data (the intl extension, present on most hosts), so an Arabic page shows الإمارات العربية المتحدة. Without it, names are in English.

If the country cannot be found, the tags are left empty rather than shown as code.

How it works with caching#

The cached page contains every link with its country rule. When the page opens, a small script asks /wp-json/nlb/v1/geo for the visitor’s country. That answer is never cached, so links show or hide correctly and tags fill in even when the page itself comes from WP Rocket, LiteSpeed, W3 Total Cache, Cloudflare or Bunny.net.

The only requirement is that your cache does not cache /wp-json/ URLs, which major cache plugins leave alone by default.

Where the country comes from#

Set the detection method at Link Bio → Geo Detection. A CDN country header (Cloudflare or Bunny.net) is the fastest and most private. See Geo Detection Settings.

Combining with other controls#

  • Schedule: a link that is targeted and scheduled shows only to those countries, during the schedule.
  • Languages: geo rules belong to the link in each language tab. Set them in every language where you added the link.
  • Show / hide: a hidden link stays hidden everywhere.

Ideas#

  • A local WhatsApp or phone number per country
  • A regional store or streaming service only where it exists
  • Hiding a product link where you do not ship
  • Shop gear in {country} as a friendly label

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only