terrastamp

Know which country and US state a visitor is in, from evidence that agrees, as a signed cookie on your own domain.

Try the demo

1. Add the script

<script src="https://api.terrastamp.dev/v1/stamp.js" data-site="YOUR_SITE_KEY" async></script>

2. Branch on the cookie

const r = await verifyStamp(req.cookies.ts_geo, { jwks, host, bindingKey, ip })
if (r.ok && r.stamp.status === 'verified') route(r.stamp.region)   // "US-NY", "GB", …

How it decides

  1. Most visitors see nothing: their IP's accuracy circle sits inside one region and the browser's time zone agrees.
  2. When that isn't enough, the visitor is asked once to share their location, and the fix is checked against the IP (or, on a VPN, against the measured network latency).
  3. The result is an Ed25519-signed stamp, bound to the visitor's IP with a key only you and terrastamp hold, so a copied cookie doesn't travel.
First-partyThe cookie lives on your domain, readable by your server on every request.
VerifiableStandard EdDSA JWT. Public keys at /.well-known/jwks.json.
HonestWhen signals disagree, the stamp says unverified and why. It never guesses.