Table of Contents
There are three main GeoDNS strategies that you can use to navigate users to the most appropriate website effectively:
- Global Traffic Director (GTD)
- IP Filtering
We’ll go over each of these in just a few moments, but first, we need a solid understanding of what GeoDNS is and how it impacts regular DNS queries.
You should already be familiar with the DNS lookup process and how authoritative nameservers use internal logic to decide which record is best for each user. If not, check out this quick guide to the DNS lookup process.
What is GeoDNS?
GeoDNS takes the geographical location from where a query is coming from and answers that query depending on what the owners of that domain have preset for that specific user’s location.
For example: If a user in the UK searches AirBnB in their browser they will automatically go to www.airbnb.co.uk because that is the closest physical name server to them. If a user from America queries Airbnb into this browser, he will automatically get www.airbnb.com
This happens because Airbnb has specific GeoDNS rules configured that incoming route traffic from certain locales to different versions of their website.
GeoDNS also has some other magic tricks up its sleeve, like the Netflix effect. Have you ever noticed that Netflix’s content changes depending on where you’re located? Users in Europe have access to a whole set of different shows compared to what people in America might have.
You can easily make similar configurations for your own domains using GeoDNS rules.
Let’s say a company has a website in English and a website in German. The most logical thing to do in this situation is to redirect traffic coming from Germany to the German website so that users won’t have trouble understanding the content.
You could also intentionally deny access to users from specific regions if you’re scared of hackers from a specific country you can set a perimeter that will not allow users from that location to access your website.
Let’s look at each of these strategies in detail and learn how you can implement them yourself in your DNS configurations.
Regional Traffic Director
Global Traffic Director, or GTD for short, is used to optimize traffic flow, by answering queries with region-specific records.
The Constellix GTD service divides the world into five regions:
- North America East
- North America West
You can preconfigure users in a region to be directed to a certain website of your choice. Remember, we mentioned this in the example with the German Website.
So all you need to do is configure a rule that will automatically send users in Europe to the European version of your site.
So far, we’ve shown that GeoDNS can calculate what region a user is in, but how can we get more specific than that?
When a query is made, that query will go through a network of resolving nameservers before it eventually reaches the authoritative nameservers (the DNS provider). All of those resolving nameservers need to pass along the IP address of the user. Now, this can actually be unreliable since IP addresses can move. So resolvers also pass along something called an eDNS client subnet.
The subnet is a short suffix that is appended to the end of an IP address that indicates where a user is located. As of February 1st 2019, otherwise known as DNS Flag Day, all resolvers are required to be eDNS compliant and pass eDNS client subnets to the next resolver.
eDNS gives authoritative DNS providers clarity into where users are located, revealing that last mile between resolvers and users’ actual locations. Your DNS provider can use this information to make more accurate traffic routing decisions.
Now that we have the subnet information, and a better idea of where the user is coming from, we can calculate the closest server nearest to their location and direct them to the desired server.
For example: If you have a couple of servers in Europe and you want to direct your European users to the servers closest to them, then you would use GeoProximity to calculate your user’s current location to navigate them towards the nearest server for a faster connection.
You can also manually set a proximity filter using the longitude and latitude of a location to get more specific results than city, state or country.
Overall GeoProximity makes sure every user gets the fastest connection and relocates them to the closest server depending on their location. It is very precise and customizable. You should always customize it depending on your desired goal.
IP filtering is used to block access to users coming from a specific location. You can configure filters to direct users based on their region, city, country, and geographical coordinates.
For instance, if there is a trend of Macedonian hackers disrupting business websites. We could preconfigure a rule that does not allow anyone from Macedonia to see your websites.
Another use could be if we want users from Europe to be redirected to a specific server due to the GDPR regulations.
You could set a rule that redirects those users to the IP address 126.96.36.199 and everyone else outside of the EU to the IP address 188.8.131.52 IP filtering is mainly used to send blocks of IP’s that come from specific region to a location the owner of the domain chooses.
Like Geoproximity, IP filtering is also customizable and should be adjusted by your desired outcome.
Wrapping things up
GeoDNS is a tool that is used for a wide variety of reasons.
- You can block access using IP filtering which sets a perimeter that will not allow users from that location to access your website.
- Optimize traffic flow by directing users to a certain website of your choice using region-specific records.
- Direct users to the closest server nearest to their current location.
Now the only thing left for you is to pick which one is most suited for your desired outcome.
By the way, do you know the difference between Anycast and GeoDNS? If you don’t feel free to check out our Anycast vs. GeoDNS article which covers the main differences between both services.