October 16, 2017

Geotargeting On WordPress: Tailor Your WordPress Site Based On Location

Photo by stokpic on Pixabay

You don’t need me to point out that the web is a global phenomenon, and yet many WordPress site owners don’t consider that their visitors can come from anywhere in the world. For local businesses, it might make sense to disregard all but a small population, but many WordPress websites could provide a better experience by tailoring content based on their visitors’ location. We’ve covered translating and localizing WordPress in several articles, so today we’re going to look at another way WordPress sites can be enhanced for a global audience: geotargeting.

Geotargeting is the practice of serving different content to an audience based on their location. A simple example would be a weather widget that displays the correct weather for the visitor’s location. It wouldn’t make sense to show a visitor from Beijing the weather for Chicago. Geotargeting lets site owners set conditions for which visitors see which content depending on where they are in the world.

Geotargeting works because it’s possible to find out a visitor’s location from their IP address. Every computer or router connected to the internet has an IP address, and each IP address — or block of IP addresses — is associated with a location. Geotargeting with IP addresses is not as accurate as GPS or WIFI-based location detection, but it’s usually good enough to determine which country and city a visitor is in.

Why Geotarget?

There are many reasons a site owner might want to provide a different experience to users in different locations.

  • To tailor promotions based on location.
  • To provide location-specific content. A restaurant review site might want to foreground restaurants near the user. An eCommerce retailer might want to give directions to their local brick-and-mortar store.
  • Geotargeting is often used for website security. If your WordPress site gets a lot of spam from a particular area, it might make sense to use geotargeting to deny IPs from that area access to your site’s forms. Although, for obvious reasons, care should be taken not to throw the net too wide.

Geotargeting on WordPress

For simple location-based content targeting, take a look at the GeoTargeting Lite plugin. Geotargeting Lite provides a couple of shortcodes that WordPress site owners can use to tag content that should be shown (or not shown) to visitors from a particular location. This is a fairly clumsy approach to geotargeting, so if you have more extensive geotargeting in mind, I’d suggest the premium version of this plugin, which can do page- and post-level geotargeting, can geotarget visitors through the Cloudflare CDN, and geotarget WordPress menu items and widgets.

WordPress, Geotargeting, and SEO

When I’ve discussed geotargeting with WordPress users, a question that often comes up concerns Google’s rules about cloaking. Cloaking is a black-hat SEO technique that serves different content to ordinary users than is served to Google’s crawlers. Cloaking is against Google’s Webmaster Guidelines and can result in a penalty.

When geotargeting content, a visitor from Montreal might see different content to a US-based Google crawler, which superficially resembles cloaking. In reality, geotargeting is not the same as cloaking. Sites with geotargeting serve different content to visitors depending on location, not whether they are a human visitor or Google’s web crawler. A web crawler with an IP associated with Montreal would see the same content as a human being browsing the web in Montreal, so geotargeting doesn’t cause SEO problems or breach Google’s Webmaster Guidelines.


Nexcess, the premium hosting provider for WordPress, WooCommerce, and Magento, is optimized for your hosting needs. Nexcess provides a managed hosting infrastructure, curated tools, and a team of experts that make it easy to build, manage, and grow your business online. Serving SMBs and the designers, developers, and agencies who create for them, Nexcess has provided fully managed, high-performance cloud solutions for more than 22 years.

We use cookies to understand how you interact with our site, to personalize and streamline your experience, and to tailor advertising. By continuing to use our site, you accept our use of cookies and accept our Privacy Policy.