Even with proper geo-targeting set up for your campaigns, search engines and ad networks will sometimes send you traffic from countries you did not request. In that case, it’s probably better for you to redirect them to an appropriate offer that takes traffic from their country. If you let the affiliate network do the redirecting, you run the risk of the visitor getting redirected to Webfetti, or some other offer unrelated to the visitor’s initial click.

I have a basic non-U.S. visitor redirect system in place.

First, you need to get GeoIP set up on your server, which I detail in my post MaxMind GeoLite Country and GeoLite City Made Easy

Once that is set up and running properly, follow these 2 steps:

1) Download my GeoIPFunctions.php file and put it in your GeoIP folder on your server.

Be sure to change the parameter on line 6 to match your server setup.

2) At the top of your PHP landing page, put this code:

  1. <?php
  2. require_once('/PATH/TO/YOUR/GEOIP/FILES/GeoIPFunctions.php');
  3. RedirectNonUS('URL of your Non U.S. affiliate offer');
  4. ?>

Again, make sure the path in the require_once matches the path to your GeoIP files.

Now when non U.S. based visitors come to your landing page, you can send them to another offer that accepts non U.S. traffic.

This system is very simplistic, and a setup that forwards any individual country’s visitors on to a specific URL would be a better solution, but I’ll leave that for later.