How to split traffic across multiple landing pages based on visitor IP address
Giorgi Mez @
You will sometimes need to serve different content to people coming from different locations. And one way to do this is to forward the visitors to different URLs based on the IP addresses.
There are myriad tools and services that offer this feature. Yet, most of them are based on an approach that I personally do not like at all: embedding a 3rd party script on your site. And there are two main reasons for my discontent:
- A script needs to be embedded, meaning someone (likely a developer) needs to be involved. This makes things inconvenient for a marketer who is running an ad and needs the ad traffic to be split.
- It's just slow: a page needs to be loaded, then the IP needs to be checked, then a redirect needs to happen and then a new page needs to be loaded.
On platforms like WordPress or Shopify the 1st issue is solvable: you can install a plugin or an app without a developer. But if this app works with the embedded script approach (and chances are high it does), you are stuck with the slow redirect.
So what's a better alternative?
Thought you'd never ask!
First of all, to solve the speed issue, the redirect needs to happen on the server, without the need to load any website in the visitor's browser. This eliminates a few steps that also happen to be the most 'expensive' as far as speed is concerned.
Below I discuss two great ways to on how to achieve server side redirects, based on who you are.
In case you are a developer
Look no further than Netlify redirects. Create a Netlify project with just a `netlify.toml` file full of redirect rules. Netlify redirects are really powerful and should be enough for most scenarios.
In case you are NOT a developer
Make use of the simple yet powerful redirect app fastfwd.to, built by yours truly.
7 comments
-
wetzelmhoonjgq1a2+260uuv30imvj@gmail.com @
-
nihil modi consequatur suscipit autem voluptatibus vero at deleniti iste. consequatur eius atque quae ipsa quibusdam nemo quia ducimus neque nemo vel et debitis ipsam in rerum consequuntur quisquam co
woodcockkienzlelsj8o9+260uut4drqqo@gmail.com @ -
quis nisi vel iusto qui cumque ab eveniet et sint. magnam est excepturi officia in ea provident autem animi tempora. totam et ut qui pariatur voluptatem odit eos tempore est ut aut enim nobis similiqu
schermerdusenberycmp5p8+260uuut0slbc@gmail.com @ -
eum voluptates earum eligendi molestiae voluptatem possimus dolor similique. similique nam perspiciatis iusto quo eaque quia alias quisquam. laborum similique quae est et itaque occaecati eius ipsa no
schermerdusenberycmp5p8+260uuts7rb90@gmail.com @ -
reprehenderit impedit sunt voluptatem omnis iure ea rerum iusto repellendus aperiam ut enim et necessitatibus fuga cumque. dolorem ex sit architecto consectetur quas facilis sapiente quidem ut fuga of
cantrellmechanicfcy5k2+q8i23eo4ka@gmail.com @ -
harum blanditiis hic omnis est cumque odit quasi ad dolor dolores. eos consectetur voluptatibus sed at doloremque voluptatem pariatur optio qui. atque sed magnam voluptatem fugiat dolorem ut dolores e
sorgelakhanakp9z5+q8i4aujpsa@gmail.com @ -
nihil in sint qui perspiciatis alias. labore cupiditate voluptas repellendus et et ipsa velit neque ea. sed sapiente ut sequi vel veniam illum veniam eum ipsum reprehenderit voluptatem sint qui asperi
medranostarckuzz8n0+q8i3m31g01@gmail.com @
consequuntur quia suscipit amet et quia at. delectus quia natus earum sit quis rerum aperiam eius a voluptatem sunt aliquam quia. et magnam aperiam voluptas eos rerum est perferendis error autem earum