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

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 Drupal Update-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 maintenance support plans Geolocation Drupal maintenance support plans Planet

Title: 

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

Source: New feed

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

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

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.