Mobile app version of vmapp.org
Login or Join
Turnbaugh106

: What's the most efficient & economical way to do GeoIP redirects for a high traffic site? So, I'm setting up a new potentially high traffic site that's made up of several simple static pages.

@Turnbaugh106

Posted in: #AmazonCloudfront #Cdn #Cloudflare #Geolocation #Redirects

So, I'm setting up a new potentially high traffic site that's made up of several simple static pages. We want to host it as efficiently as possible, as we're both on a non-existent budget and may have to deal with traffic spikes, so have been thinking CloudFlare, AWS S3/CloudFront, or some similar service.

However, the catch is we need the root page / to redirect to /ccTLD, for example: redirect to /us for U.S. visitors or /au for Australian visitors.

Does anyone have any ideas on how we can best approach this? So far I'm thinking either we have to resort to using JavaScript which looks dodgy, or simply pushing / requests through to a VPS or EC2 instance, which creates a bottleneck I'd rather avoid.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Turnbaugh106

2 Comments

Sorted by latest first Latest Oldest Best

 

@Shelton105

CloudFlare has an awesome feature that automatically injects the user's country into the request headers (and this works even on their free plan). You could then easily use a server side redirect to direct the visitor to the appropriate URL based on this header.

I've been running CloudFlare on top of our site for a while and am loving it so far.
www.cloudflare.com/

10% popularity Vote Up Vote Down


 

@Voss4911412

The simplest and cheapest option of course would be to just let visitors direct themselves as many large corporate sites do, however this may not be ideal for your site...

So if you don't want to use JavaScript, like Maxmind's Free GeoIP2 JavaScript API, then using a combination of the PHP GeoIP Location extension with Maxmind's Free GeoIP Country database and Amazon's Elastic Compute Cloud (EC2) might be the most efficient and economical way to go taking into consideration scaling and start-up factors.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme