Spiral Hosting Blog

Businesses can use Geo IP location to detect a visitor’s country

Published by on March 17th, 2022

All our web hosting servers include the Geo IP module. This module links your website to a database mapping a website visitor’s IP address to their geographic country.

What’s an IP address?
Every Internet connection has an IP (Internet Protocol) address given to you by your ISP (Internet Service Provider). Some users will have a static IP address (that never changes) and others will have a dynamic IP address (that changes every few days). In both cases your IP address will be registered to your Internet provider in a specific city and country. Website owners can use this information to detect your approximate location. The database is 99.8% accurate.

How can Geo IP location be used?
The Geo IP module is a useful feature that can be used to allow/deny access from specific countries, for example if you have a company website and you do not accept orders from specific countries.
It can be used to redirect visitor’s from specific countries, for example if your website has different landing pages for clients in different markets like the European Union, USA and Asia.

Geo IP and it can be integrated with PHP code so your web developer can easily write a script to serve different content to different countries.

Recently we’re receiving more enquiries about this feature due to the war in Ukraine and businesses wanting to block visitors from Russia. Every country has a two letter ISO code, in this example “RU”, and a website owner can use this to allow/deny access. It’s fairly easy to do this and we have a knowledge base article with some useful examples.

We recommend implementing any country deny/allow rules or .htaccess rewrite rules in conjunction with your website developer / IT person. You can easily test it out with our examples and by using your own country code (for example “IE” for Ireland, “GB” for United Kingdom, “DE” for Germany).

Geo IP is enabled by default on all our web hosting servers. You do NOT need to enable it in your control panel. You can go ahead and start using it in an .htaccess file or PHP script. If you have your own dedicated server, please contact our support team. Most dedicated servers include full server management and our technicians can install the Geo IP module for you.

Please reach out to us if you encounter any problems. Our support team will be happy to assist.

Got Questions? We're here to help you.