WPLocation

Country-aware content for WordPress

  • Features
  • Demo
  • Add-ons
  • Pricing
  • Blog
  • Account
  • Get WPLocation
← All add-ons/CloudFront Country Source

Free add-on · separate ZIP · available now

CloudFront Country Source

Use the country CloudFront already knows.

Serve WPLocation Free and Pro country rules from verified CloudFront viewer headers. No MaxMind account, WPLocation lookup credits or per-visitor API call is required for this source. Your own CloudFront distribution is required.

Download the free add-on →Read setup guide ↗
Illustration of a visitor request passing through CloudFront to WPLocation country rules, with a private origin token and local database fallback.

CloudFront → verified source → Free and Pro rules

A free optional source

Install Free 1.1.6 or newer and this separate 1.0.1 ZIP. Pro 1.4.0 or newer uses the same country through Free. The add-on is disabled until an administrator configures a private origin token, both viewer headers and a safe cache policy.

How it works

Three checks before a country decision.

A browser-supplied country header alone is never enough. The source only trusts a request that passes the configured origin token and viewer-address checks.

01 / TRUST

Verified origin token

CloudFront supplies a custom origin header. WPLocation stores only its SHA-256 hash and checks the token on each request.

02 / VIEWER

Real viewer address

The forwarded CloudFront viewer address prevents local fallback from using a CloudFront edge IP. A missing address closes the source to unknown.

03 / COUNTRY

Validated country code

Only a known two-letter country code enters the shared Free and Pro rule engine. If absent, an optional local MMDB can use the verified viewer address.

04 / CONTROL

Clear admin status

Generate and rotate the token, explicitly enable the source and check the current request from WPLocation → CloudFront Source.

Cache-aware setup

Configure CloudFront before enabling.

Forward CloudFront-Viewer-Country and CloudFront-Viewer-Address to WordPress, and set the custom origin token. Keep personalized HTML uncached or include country in the CloudFront cache key. Account and checkout pages should never be publicly cached.

A CDN hit can bypass WordPress entirely, so verify the real distribution with at least two countries and the direct origin. The isolated release tests did not include a customer AWS distribution.

Follow the setup and cache test →

What you need

  • WPLocation Free 1.1.6+
  • Your own CloudFront distribution in front of WordPress
  • Access to edit its custom origin headers and origin request/cache policies
  • Pro 1.4.0+ only if using Pro rules

This is a WPLocation integration for Amazon CloudFront, not an AWS partnership.

Common questions

Know the boundaries.

Does it need MaxMind or paid WPLocation credits?

No, not when CloudFront provides the verified country. A local licensed MMDB is optional fallback. Your AWS distribution and transfer charges are separate.

Can I use it without CloudFront?

No. Do not enable this source for a direct-origin site. Free can continue using a locally licensed GeoLite2 Country database.

Does a verified country make content private?

No. IP location is approximate, and a CDN can serve cached content before WordPress runs. Use authentication and access controls for confidential information.

How do updates work?

Download a newer add-on ZIP from WPLocation when released and replace the plugin after a backup. Free and Pro use their own update paths.

Ready to connect your distribution?

Start with the verified source.

Install Free, add the separate CloudFront ZIP, then follow the setup guide before enabling it.

Download CloudFront Source →Read the guide

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]