Hola! ¡Tenemos nuestra Comunidad en Español!

Location redirection based on IP address

resolver
Colaborador ocasional

Hi There,

 

I'm managing a multi-region/language website and am looking for a way to automatically show the relevant website based on a visitors IP address. HubSpot provide a way to show language specific content based on IP, however, I don't know if there is a way to show a specific page or website based on IP address. Has anyone else come across this issue or have a solution they could share? 

 

Thanks in advance,

Tavis

1 Soluciones aceptada

Soluciones aceptadas
Highlighted
Colaborador distinguido

Hi @Tavis 

 

HubSpot has Smart content option, but that's not going to solve your problem. You need to implement a third party geo IP tool to properly redirect your page based on the IP address. 

 

Here's a quick guide I found on Quora, it helps to understand the behind the scene logic. You might need a developer's help to implement it. You might want to check ipinfo.io as well.

 

Disclosure: I'm not associated with these companies (links mentioned above). 

 

Thanks.

Aakar Anil
Marketing Technologist
aakar.me | @aakarpost | in/aakarpost
7 Respuestas 7
Asesor

You can create translations for pages which I believe would work for you (must be marketing pro or above or HubSpot CMS) check out this page to see the walkthrough.

 

https://knowledge.hubspot.com/articles/kcs_article/cos-general/how-to-manage-multi-language-content-...

 

 

Responder
0 Me gusta
Colaborador ocasional

Hi @ConnorSlivensky, the content is not the issue here. I'm wanting to show another site all together based on the visitor ip address i.e. www.mywebsite.com/us or www.mywebsite.com/fr

 

Any suggestions?

 

Tavis

Responder
0 Me gusta
Líder intelectual | Partner de nivel Diamond de HubSpot

Hi @Tavis 

 

You are right, the geolocation feature that can be applied to smart content, does not extend to the localised content features - which would be great if it did. 

 

The localised content should implement best practice meta tagging so that search engines have the best chance of returning the right content to searchers, but you can't direct incoming traffic to a specific version based on IP - not natively anyway. 

 

I've been looking to see if there is a third-party solution that I, as a non-developer, can understand, but I haven't found anything yet. 

 

Hope this helps.

Phil Vallender | Inbound marketing for B2B technology companies
Responder
0 Me gusta
Highlighted
Colaborador distinguido

Hi @Tavis 

 

HubSpot has Smart content option, but that's not going to solve your problem. You need to implement a third party geo IP tool to properly redirect your page based on the IP address. 

 

Here's a quick guide I found on Quora, it helps to understand the behind the scene logic. You might need a developer's help to implement it. You might want to check ipinfo.io as well.

 

Disclosure: I'm not associated with these companies (links mentioned above). 

 

Thanks.

Aakar Anil
Marketing Technologist
aakar.me | @aakarpost | in/aakarpost
Colaborador ocasional

Thanks for the reply Aakar,

 

I'll look into a third party solution to address this issue.

 

T

Responder
0 Me gusta
Nuevo colaborador

Also, I'd recommend adding a check for  `!window.hsInEditor` (and `window.location.href.indexOf('hs_preview=') === -1`?) to the redirecting Javascript code to prevent the redirect from happening when you are actively editing (or previewing) the page in the HubSpot page editor.

Equipo de producto de HubSpot

Hi Tavis,

 

I'm a bit late posting here, but want to reply anyway for anyone else who may have the same question. 

 

Others have posted good info here on how you might go about redirecting traffic based on IP address, but we have one question to ask ourselves first: Should we redirect someone to a certain language based on their IP address? 

 

I'd argue that we should not because it would be unexpected behavior (most people will not expect www.domain.com forward to www.domain.com/it - especially if they really are looking for the site in your primariy language), and there are a few other things we can do to help users find their preferred language: 

 

  1. If you have the budget and want to get more local-friendly in your global markets, I would recommend purchasing the country-code TLDs for your primary markets, then redirect those to the appropriate subdirectory or subdomain (or host directly on those - either way works; based on your question, I'm assuming you're not using ccTLDs, but perhaps I'm wrong). For example, domain.it can redirect to domain.com/it. Unlike the auto-redirect based on an IP location of "Italy," this setup would likely lead a visitor to the language they expect (TLD of .it will reasonably lead to Italian-language content), and that's good. We just don't want to give them a behavior they do not expect.
  2. Make sure your language-switcher module is easy to find. The header of a website is the most common placement, and a globe icon is pretty universally understood to indicate language options (as opposed to the chosen language written out, which might confuse someone who doesn't speak the language of the page they land on). 
  3. If you have HubSpot Pro or Enterprise and you want to highlight the option to change the page language (in addition to the language switcher in header), you could use a smart CTA based on browser language. So, if your second language is Italian, you could choose to show a version of a CTA to visitors with "Italian" as their browser language which suggests the Italian page (in Italian). I think browser language is more likely than the IP address to accurately indicate the visitor's preferred language. There will always be plenty of people who are travelling or non-native and multi-lingual, and their browser will likely be set to their preferred language. 

I hope this is helpful! Best of luck to you in your multi-language setup. 

Snaedis Valsdottir
Associate Product Manager, CMS Publishing
Responder
0 Me gusta