Landing Page Based on IP - How to do

5 replies
Hey Guys

Just a question for the Tech Minded. We have a website that we want to have different home pages thrown up depending on the IP of the User.

E.g. If the User is in New Zealand it throws up one home page if they are from an IP of any other country another Page is thrown up.

how do you do this and is there a script or something?
#based #landing #page
  • Profile picture of the author SteveJohnson
    Very easy to do with any scripting language - PHP, ASP, etc. I don't know of any ready-made script for it, but then I've never gone looking, either.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[2901113].message }}
  • Profile picture of the author SteveEO
    I think it would be a great little bit of script to have. Wonder how it would effect the Serps.

    Anyone know of a script for this?
    {{ DiscussionBoard.errors[2901115].message }}
  • Profile picture of the author gtk29
    I personally use PHP all the time. I know this script which is used to convert IP address into country name/code. This requires you to download a CSV database which contains ranges of ip address (long form) for each country. You have to keep this database up-to-date. You can easily convert it into any scripting language of your choice.

    Another quick way is to query geoip.wtanaka.com/cc/[IP] just replace [IP] by the ip number. You woul get the country code. For example, geoip.wtanaka.com/cc/216.52.207.73 return us - meaning USA.

    Once you know the user's country, then you can just direct them to related pages or maybe sub domains like hxxp://us.google.com for USA or something like hxxp://www.google.com/us/index.php. Sky is the limit.
    {{ DiscussionBoard.errors[2901391].message }}
  • Profile picture of the author markowe
    Remember geotargetting by IP is not an exact science, there can be false ids (maybe 5-10%, though that's just an edumacated guess, depends on the ip service of course), so you need to let users choose too if it gets it wrong. I implemented geotargetting in my WP ebay plugin but in all honesty 95% of sales still end up coming from the US, with a dribble from the UK and that's about it.
    Signature

    Who says you can't earn money as an eBay affiliate any more? My stats say otherwise

    {{ DiscussionBoard.errors[2908716].message }}

Trending Topics