Location Based URL Redirection in AWS

by peso   Last Updated October 15, 2017 04:00 AM

How would I approach doing a URL redirection that has the following effect:

Website: example.com

If users come from an Indian IP address: example.com -> india.example.com

Answers 1

Route53 with location based routing would be the typical way to handle location based things. It won't change request domains, but it will route requests to the nearest region.

To achieve that you want, Route53 can add a header that says where the query is coming from. Based on that you can have a web server do a redirect.

Next option is to subscribe to a geolocation database. Use a PHP script to decide on location based on source IP and forward accordingly.

October 15, 2017 03:34 AM

Related Questions

CloudFormation with an ELB and its public dns

Updated April 02, 2015 19:00 PM

Access Amazon S3 Static Website Through IPv6

Updated March 31, 2016 08:00 AM

What is an Amazon Route53 "Alias" DNS record?

Updated April 08, 2018 12:00 PM

IPv6: can't resolve host on Route 53 backed by CloudFront

Updated September 25, 2017 20:00 PM