• About Pixeldust

Vardot: What Are My Options to Get Geolocation Detection in My Site?

Published on October 31, 2020

Annertech: Annertech: Web Agency of the Year

Annertech: Web Agency of the Year My fingers are trembling typing this. I can’t believe it. This morning everyone in Annertech land is thinking “did that really just happen?” It appears it did, we are the web agency of the year! Last night, to top off the other three awards we won – best arts […]

Flickr: Registration Desk – Tuesday – DrupalCon Dublin 2016

comprock posted a photo: The Drupal community is one of the largest open source communities in the world. We’re developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together in a European city for […]

Flickr: Sprint Lounge – Tuesday – DrupalCon Dublin 2016

comprock posted a photo: The Drupal community is one of the largest open source communities in the world. We’re developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together in a European city for […]

Flickr: Tuesday – DrupalCon Dublin 2016

comprock posted a photo: The Drupal community is one of the largest open source communities in the world. We’re developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together in a European city for […]

Flickr: David & Paul – Scout masters – Wednesday – DrupalCon Dublin 2016

comprock posted a photo: The Drupal community is one of the largest open source communities in the world. We’re developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together in a European city for […]

Flickr: Jam interview – Wednesday – DrupalCon Dublin 2016

comprock posted a photo: The Drupal community is one of the largest open source communities in the world. We’re developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together in a European city for […]

Flickr: Sprinters wanted – Wednesday – DrupalCon Dublin 2016

comprock posted a photo: The Drupal community is one of the largest open source communities in the world. We’re developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together in a European city for […]

Flickr: Sprint Lounge – Wednesday – DrupalCon Dublin 2016

comprock posted a photo: The Drupal community is one of the largest open source communities in the world. We’re developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together in a European city for […]

Leopathu: Dynamic Block Weight in Drupal 8

In such a time, i want to place blocks in sidebar region with the dynamic weight. It means the blocks should render in different position for each page request. I have searched and tried lots of method but unfortunately i can’t find proper method to do that. So i have decided to do that with […]

Agiledrop.com Blog: AGILEDROP: Drupal‘s path from 4.0 to 8.0

Last time we guided you through early beginnings of Drupal. We explained how all started and how first versions of Drupal were made. This time we will look how this open-source content-management framework evolved from its fourth to its latest, eight version. Drupal 4.0 Drupal’s fourth version was released on 15. 6. 2002. It became […]

Flickr: Wednesday – DrupalCon Dublin 2016

comprock posted a photo: The Drupal community is one of the largest open source communities in the world. We’re developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together in a European city for […]

OStatic: Web Publishing and Development: Free Tools Abound

Are you involved in DevOps and web development, or are you aiming to be? If so, you’re probably very aware of many of the tools from the open standards and open source arenas that can make your work easier. Still, these are always spreading out at a fast clip and there are some applications and […]

How to, Resources Read time: 4 minutes IP geolocation detection works through well-known databases that map IP ranges to countries. For example:

an IP range of 5.83.240.0 to 5.83.255.255, means that it came from Ireland.
an IP range of 46.23.112.0 to 46.23.127.255 means that it came from Jordan.
an IP range of 86.36.0.0 to 86.37.255.255  means that it came from Qatar.
and so on.

Major and credible IP mapping databases are MaxMind, ip2c.org, and IP2Location.
The problem with using a database lies in performance. Each request to view your website, will generate a request to the IP database, to determine the country.
If you get 5 requests per second, this means 5 queries to your IP database, to determine the country.
Therefore, you will need to rely on a very fast, highly optimized, database engine to carry the load of IP-to-country queries.
This database must not be your website’s database.
And therefore, for faster performance, and to not overwhelm the site’s servers with IP-to-countries queries for each page view, we can have the following implementation options:
Through a Third-party
Having the detection from a third-party is easier to setup, and requires you to pay for the service of the third-party only. No extra setup or maintenance is required from you.

CloudFlare IP Geolocation: CloudFlare applies a layer between the visitor and the servers of your website. CloudFlare supports GeoIP location detection, and is embedded in that layer without any extra effort. Your website must be using CloudFlare CDN and “IP Geolocation” option must be enabled at your CloudFlare settings.
CloudFlare’s Pro subscription requires your DNS zone file to be managed from CloudFlare which is not a good option for some organizations.
See pricing here: https://www.cloudflare.com/plans

 
MaxMind GeoIP2 Precision Web Services: MaxMind provides reliable GeoIP detection. By using the paid service (not the database), the load is managed by MaxMind’s servers and not your site. A user ID and license key is required here. You will need to buy one of their services and they will provide you the login details. You can view your user ID and license key inside your MaxMind account.
See pricing here: https://www.maxmind.com/en/geoip2-precision-services
If you opt-in for Country-level detection (costs $0.0001 per query), and your site gets 200,000 visits per month, you’ll need to pay $20/month.

Through Homegrown Solution (Using Databases)
You can use the available databases (MaxMind, ip2c.org, or IP2Location) to build your own detection. However, a high-performance setup is required here to handle high traffic. Also you should consider the maintenance costs, and manual database updating (which usually needs to be updated every week).
Assuming that you have access to your servers (a.k.a hosting  with a VPS or Dedicated Servers), this setup can be done through:

Using Same Servers or Reverse Proxy: You can install MaxMind DB Apache Module, which allows for IP-to-location queries to MaxMind database from Apache, thus getting the information faster from querying your site’s database or application.
Setup a Node.js Server with MaxMind Database: You can install a pure JavaScript module for Geo IP lookup using MaxMind binary databases. This provides very fast look up using Node.js. Remember you’ll need to maintain this setup, and keep updating the database manually.

 
Recommendation
If you’re looking for faster time to market, and less maintenance overheads, go with one of the third-party implementations. You’ll get more reliable and accurate service.
The homegrown solution will provide cheaper solution, but will be on the expense of maintaining it. That is of course of you have the ability to perform this setup. Tags: 
Drupal Support Service Geolocation Drupal Support Service Planet

Title: 

What Are My Options to Get Geolocation Detection in My Site?

Source: New feed

REQUEST FOR PROPOSAL

Need a quick project proposal?

Submit the RFP form below and we will send you a project proposal in 48 hours. If you like what you see, we can schedule a call to discuss the project in greater detail.

Step 1 of 2

  • Contact Information

Drupal Support Plans Compared

* Subject to reasonable use. Small fixes and updates must be requested one at a time and take no more than 30 minutes. Only mission-critical tasks are addressed on weekends.

Shopping Cart
There are no products in the cart!
Continue Shopping
0
X