Jump to content

Recommended Posts

Posted

Hi Guys, 

I am going to add capability to a USA version of a site to redirect or display a message to users visiting the website from UK or Ireland notifying them of an international website at .co.uk

Any suggestions, module recommendations, plugins etc. ?

Figured I would ask before I started working on this solution.

Thanks! 

Posted

Hi Sergio,

Thanks for the links.

However, I was referring to an actual tool that checks the users location and then if the user is coming from the UK and visiting the US website, I can pop up something saying we have a UK website. Then offering the idea of sending them there.

Like GEOIP or something like that.

I am still comparing solutions.

Posted

@adrian

Yes and no. 

Basically this module simply displays the correct language. 

What I need is to check if they are from the UK and then redirect the user to the .co.uk version of the website. 

Or

Trigger a pop up that asks them if they would like to visit the UK version of the website. 

  • Like 1
Posted

Just a few thoughts:

I'd go with the legacy GeoIP databases and use geoip_country_code_by_addr (and optionally its IPv6 sibling). This should only be a few lines of code, plus, depending on the server you're running, perhaps a few more lines to download the current database every month (AFAIR, some Linux distributions even provide packages with cron jobs for that already included).

Don't waste too much time trying to find the optimal solution by looking at browser headers etc. - those solutions don't exist. People surf through foreign proxies, use their en-gb browser on a trip to the U.S. or surf the U.S. page from an internet cafe in the UK.

Make sure to avoid annoying the users. Embed the pointer to the native site in a prominent but pleasing way in the page, don't disturb them with javascript popups (modal or not). The first time, they'll click it away. The second time, they'll sigh and click it way. The third time...

Whatever you do, never redirect a user automatically just because you think you know their origin or preferred language. They may well have a reason for wanting to access the URL they've entered or clicked. Instead, add a language switcher that lists all languagues/countries in their native language (the latter is not much of a point for U.S./UK/Ireland, but for the sake of completeness, I'll mention it here).

  • Like 5
Posted

@adrian

Yes and no. 

Basically this module simply displays the correct language. 

What I need is to check if they are from the UK and then redirect the user to the .co.uk version of the website. 

Or

Trigger a pop up that asks them if they would like to visit the UK version of the website. 

Right - sorry I really didn't read your post properly :)

I think you will need to roll your own. As mentioned above there are several databases available (some free) or services that can allow you to match a user's IP to their location.

I also have to strongly agree with @BitPoet - be sure not to annoy the user and make assumptions - always give them an option.

Posted

Awesome thanks guys!

I will run with the recommended GeoIP solution. 

Also, will not use auto redirect. 

I am going to trigger a pop up instead asking them if they want to visit another version of the site. 

Thanks!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...