Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Best way to geo-target visitors to website?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Best way to geo-target visitors to website?

Hey folks looking for some advice here on the following case;

I want to give different content to website visitors from outside vs inside of the country. The content of the website will need to be almost entirely different. (The business normally provides face-to-face services but wants to provide online services to international clients. However the local home country website cannot mention online services because local regulations to not allow these services to be provided online for local clients.)

Should the geo-targeting be one via a script or a plugin (it's a Wordpress site), or should there be a redirection at the DNS-level which will go to a different host for foreign visitor IPs. Since the content and focus will shift kind of a lot, I'm not sure if just giving different text on the website will be enough, maybe there should be two entirely different websites that get redirected to. What are the best practices with this, how do others usually do it?

Comments

  • KermEdKermEd Member
    edited December 2021

    Usually separate sub folders

    i.e.
    something.com/international
    something.com/local

    With WordPress there are auto translation and presentation plugins but they are usually location and language based

    i.e.
    something.com/en-ca
    something.com/en-us

    You usually don't enforce it too strictly as users might be on a VPN and need to switch locations and sometimes the detections just wrong. Imho

    You can separate pages based on locale and add menu options based on locale. So most of those translation plugins can do this part for you. It's not uncommon to have different pages presented in different regions. I've used translatepress for this in the past I believe. Still a pain as you need to manage two different sites in one, but easier than two completely separate sites.

  • @KermEd said:

    Language will be the same for all websites, but maybe language plugin could be exploited to accomplish two different website versions. I wonder if it would mess with the SEO though, maybe those plugins bury language tags, I need to check it.

  • serversupportzserversupportz Member, Host Rep

    You can have a "homepage" where you let people choose their country. Then, the country real homepage in the subdirectory would be the one you optimize for country specific visitors. Google is very good at understanding hierarchical structure of websites. Also, don't forget to target even for languages using HTML markup in ,

  • @serversupportz said:
    You can have a "homepage" where you let people choose their country.

    It has to be non-optional, local visitors need to be unable to view the international offering.

    Thanked by 1Shot2
  • NoCommentNoComment Member
    edited December 2021

    @kerouac said: Since the content and focus will shift kind of a lot, I'm not sure if just giving different text on the website will be enough, maybe there should be two entirely different websites that get redirected to.

    I think you have answered your own question.

    @kerouac said: redirection at the DNS-level

    Yes.

    @kerouac said: It has to be non-optional, local visitors need to be unable to view the international offering.

    Some sites outright block you or just redirect you back to the local site. Some don't do anything about it.

  • @smallbibi said:

    Yes.

    Suggest any providers?

  • User should be able to chose their region when they visit your site for first time.
    Take https://bestbuy.com/ as example

    You can save cookie in browser and then show different variants of Wordpress pages depending on cookie - you can do it by Rewrite Rules in .htaccess ( RewriteCond HttpCookie ) or custom code in PHP. This allows for most seamless experience because one link works everywhere. If user has cookies disabled you can have fallback to what is better for your SEO, so Google indexes that version.

    Thanked by 1Shot2
  • @kerouac said:

    @smallbibi said:

    Yes.

    Suggest any providers?

    Route53, they have documentations for geolocation routing too. There are of course other options but you will have to research yourself.

  • JasonMJasonM Member
    edited December 2021

    cloudflare workers can redirect according to geo-ip.

    example.com/uk
    example.com/fr
    example.com (default country, or global)

    or even to subdomains.

    here's an example: https://getfishtank.ca/blog/how-to-setup-simple-geo-redirection-in-cloudflare

    Thanked by 1kerouac
  • LMFTFY

    @smallbibi said: they have documentation for geolocation

  • Nginx could do this, you can have two(or more) entirely different websites on one domain

    Here is some example https://gist.github.com/kmjones1979/fcabb4731bbf85b9c50189e90d76b1c1

  • @JasonM said:
    cloudflare workers can redirect according to geo-ip.

    example.com/uk
    example.com/fr
    example.com (default country, or global)

    or even to subdomains.

    here's an example: https://getfishtank.ca/blog/how-to-setup-simple-geo-redirection-in-cloudflare

    Looks interesting, thanks

  • @kerouac said:

    @serversupportz said:
    You can have a "homepage" where you let people choose their country.

    It has to be non-optional, local visitors need to be unable to view the international offering.

    You can't do that. That's not how the internets work.
    Even the Chinese government with all its might and soldiers can't keep a foreigner in a Wuhan hotel from visiting free-tibet.biz in their native swahili tongue.

  • risharderisharde Patron Provider, Veteran
    edited December 2021

    I am currently thinking of how to accomplish this on my developing dns service! I was thinking to do this based on country ip in which the dns server will respond with an A record with the designated host ip you assign for it. Not too sure if that's how the other providers do it but at the dns level, I assume the overall overhead would be the least but finding a way to look up those ips/country is what I am concerned about in terms of speed. Mind you, I am coding more or less from scratch - clearly these providers have been able to accomplish it already.

Sign In or Register to comment.