WPLocation

Country-aware content for WordPress

  • Features
  • Demo
  • Add-ons
  • Pricing
  • Blog
  • Account
  • Get WPLocation
← All documentation/How country detection works and where it can be wrong
Free + Pro

How country detection works and where it can be wrong

For the current website releases: Free 1.1.4 and Pro 1.4.0.

On this page
  1. Why results can differ
  2. What WPLocation does when lookup fails
  3. Protect trusted proxy handling
  4. Improve the quality of decisions
Free setupPro & licensingMy account & downloads

WPLocation resolves a visitor’s estimated country from their IP address using a local GeoLite2 Country MMDB selected in Free. Pro uses the same resolver; it does not make a second hosted lookup for each visit. A country is an estimate of network location, not a claim about a person’s residence, citizenship, shipping eligibility or legal rights.

Why results can differ

  • VPNs and company networks: the visible IP may belong to an exit node in another country.
  • Mobile carriers: shared gateways and roaming can make the apparent country differ from the device’s physical position.
  • Newly assigned IP ranges: even a current database may lag real network changes.
  • Proxy or CDN configuration: WordPress can see the proxy address instead of the visitor address if forwarding is not verified.
  • Private, local or unmapped addresses: these may have no country result.

What WPLocation does when lookup fails

It does not guess a fallback country. An active restriction hides content if the country is unknown; unrestricted content is left alone. A United States shortcode can display a fallback label. Check the shortcode examples and blocked-content behavior.

Protect trusted proxy handling

Free does not automatically trust arbitrary forwarded-IP headers. A site-specific integration may use the wplocation_verified_client_ip filter after verifying that requests come through your own proxy or CDN and that direct origin access is controlled. Never treat a client-supplied X-Forwarded-For value as verified on its own. See the trusted proxy guide.

Improve the quality of decisions

Keep the licensed database current, inspect its build date in Diagnostics, test representative networks, and review your cache. Use the appropriate business checks at checkout or login for legal and security decisions.

Where to next?

Choose the right country rule →Check your cache and CDN →Browse all guides →
Need help with this guide?

Contact WPLocation with your software versions and the result you expected. Keep keys and customer data private.

Company

  • About us
  • Contact
  • Terms & Conditions
  • Privacy Policy

Product

  • Features
  • WPLocation Pro
  • Pricing
  • Add-ons roadmap
  • Get WPLocation

Resources

  • Blog
  • Documentation
  • Installation
  • Shortcodes
  • Changelog

Account & Support

  • My Account & Licenses
  • Contact Support
  • Blocked-content behavior

Copyright © 2026. WPLocation is a project of TechAbout LLC.
Questions? [email protected]