Cloudfront Geolocation headers

August 04, 2020

Amazon Cloudfront Logo

New Geolocation headers

Recently, Amazon Cloudfront added support for geolocation headers.

This helps sites serve content dynamically based on where their viewers are.

Demo Site

I wanted to see what all the fuss was about and how accurate my location was based on these headers.

So I made a demo site to see how accurate these headers are.


Here are some of my findings so far:

  • I live in Reston, VA. When reaching the site on my ISP, it puts me in Herndon, VA – which is pretty close.
  • When using my phone, Pixel 2XL and AT&T, it puts me in Baltimore – pretty far away.
  • When using an iPhone on Verizon, it only gives Country information, and gives Central time zone instead of Eastern.

So Cloudfront GeoLocation headers aren’t perfect, but you can’t expect that much precision from a free product that does location lookup based on IP address.

Written by Owen Collier-Ridge who lives and works in Washington D.C building things in clouds and playing games. You should check out his personal site.