JavaScript IP-based redirection, best approach?
-
Hi everyone,
What are the best practices for implementing Javascript redirections like on http://www.nike.com/ to send visitors to the right country section? I see it uses cookies and sessions to store the country and language, but what about search engines? Are they redirected via JS? Are there any risks that Google can't crawl everything?
We had IP-based, server-side redirections on a few country-specific websites (purehazelwood.com, purnoisetier.fr, purnoisetier.com) that we had to remove because googlebot was always redirected to the US site and couldn't access the other sites. We instead added pop-ups if the visitor is accessing the "wrong" site but we'd like the redirection to be automatic.
Is the javascript approach the best? Anything else we need to think about?
Thanks for your time!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Important pages are being 302 redirected, then 301 redirected to support language versions. Is this affecting negatively the linking juice distribution of our domain?
Hi mozzers, Prior to my arrival, in order to support and better serve the international locations and offering multiple language versions of the same content the company decided to restructure its URLs focused on locale urls. We went from
International SEO | | Ty1986
https://example.com/subfolder to https://example.com/us/en-us/new-subfolder (US)
https://example.com/ca/en-us/new-subfolder (CAN)
https://example.com/ca/fr-ca/new-subfolder (CAN)
https://example.com/de/en-us/new-subfolder (Ger)
https://example.com/de/de-de/new-subfolder (Ger) This had implications on redirecting old URLs to new ones. All important URLs such as https://example.com/subfolder were
302 redirected to https://example.com/us/en-us/subfolder and then 301 redirected to the final URL. According to the devs: If you change the translation to the page or locale, then a 302 needs to happen so you see the same version of the page in German or French, then a 301 redirect happens from the legacy URL to the new version. If the 302 redirect was skipped, then you would only be able to one version/language of that page.
For instance:
http://example.com/subfolder/state/city --> 301 redirect to {LEGACY URL]
https://example.com/subfolder/state/city --> 302 redirect to
https://example.com/en-us/subfolder/state/city --> 301 redirect to
https://example.com/us/en-us/new-subfolder/city-state [NEW URL] I am wondering if these 302s are hurting our link juice distribution or that is completely fine since they all end up as a 301 redirect? Thanks.1 -
Best way to interlink 25 different language versions of a website?
I have a website which has 25 different language versions on 16 different domains. Hreflan are setup to point to different language versions. In the footer we have deeplinks to the 25 language versions. Site is not spammy but in small niche and many language versions have very few other external links. For some time this site had lost rankings for reasons that are unclear till now. I see that large international sites such as booking.com, tripadvisor, apple all use different approaches to interlink their language versions. Interestingly Tripadvisor is nowadays loading the links to their other language versions dynamically only upon click so that these links do not show up in source code, deviating from their former implementation of static deeplinks to all language versions. Matt Cutts mentioned back in 2013 “If you have 50 different sites, I wouldn’t link to all 50 sites down in the footer of your website, because that can start to look pretty spammy to users. Instead you might just link to no more than three or four or five down in the footer, that sort of thing, or have a link to a global page, and the global page can talk about all the different verions and country versions of your website.” But in their webmaster guidelines google recommends: "Consider cross-linking each language version of a page. That way, a French user who lands on the German version of your page can get to the right language version with a single click." I assume for SEO anyway these links have no value, but for user experience it would certainly be better to provide somewhere deeplinks to other language versions. Also the fact that language versions are on different domains and have few external backlinks may increase a bit the risk in our case. I guess in doubt I would prefer to be safe and load deeplinks only upon click same as tripadvisor. Any thoughts/suggestions on best interlinking in our specific case?
International SEO | | lcourse0 -
Multi Regional Website Best Practices
Hi there, I have a website that is targeting 3 countries AU/US & NZ. I have set up hreflang tags for each page on each of the site however I am having difficulties getting it work right. I read this article which was a great insight into the hreflang tags. https://moz.com/blog/hreflang-behaviour-insights and as a result I have implemented hreflang tags in the following manner: When users access the root domain http://[website] it will redirect the user to their locale with a 302 redirect. I have a few questions:
International SEO | | nathanfranklin
1. When building my external link profiles, I'm not sure if I should be building link profiles for http://[website]/ or for the geo graphical pages (http://[website]/aus/ etc..). Note that the http://[website]/ is never used, it just issues a 302 to the actual geographical location. 2. It seems that the hreflang tags are not working correctly. Perhaps its the result of the 302 on the root page, but in google.com.au (using the link http://www.google.com.au/search?hl=en&gl=au&pws=0&q=[branded search]) I would expect that I should see the search results for /aus/ given the fact that the hreflang tags are setup as en-au. Instead I am seeing the root domain page. Is that correct or should it be showing all the pages with /aus/. ALSO If I do a search in google thailand (http://www.google.com.au/search?hl=en&gl=th&pws=0&q=[branded search]) it returns the /aus/ version where it should be showing the /us/ using the x-default hreflang tag. In google webmaster tools I have setup 4 site profiles:
http://[website]/
http://[website]/us/
http://[website]/aus/ (Targeted to Australia)
http://[website]/nz/ (Targeted to New Zealand) Any help would be appreciated. Thanks Nathan1 -
Best practice for WPML, Yoast and sitemap for google
Hi Mozzers, I have a wordpress installation and work on a hotel website in three different languages: English, German, Spanish. In order to manage each language as a regional or global website, I started to give the website the names like: de.hotelnamen.com, es.hotelname.com (Hotel is in Costa Rica, maybe cr.hotelname.com is even better???) and hotelname.com. The possibility of WPML to manage my multilingual blog is good and the Yoast plugin gives me the sitemaps I want for each language. Because it is a hotel I have to have a global page which should serve the world if they try to find the hotel, right? That's why i put hotelname.com as a global page in English and registered the sitemaps and page on my webmaster account in countries as "not listed". For de.hotelname.com I choose Germany on another webmaster account and for es.hotelname.com Costa Rica (the country in which the Hotel is located). Unfortunately, after three month I don't receive good results with that methode. The hotelname.com adress is always the page which comes up in all search engines. I my tactic wrong? Where is my mistake? I would like to have hotelname.com in the rankings of all search engines beside of google Germany because for the German market I have the German version. Same in Costa Rica. Thanks for some ideas...
International SEO | | reisefm0 -
When is it best to use a ccTLD or TLD?
I understand that the relative importance of domain extensions - .com is better than .biz, etc. - is a bit of a myth. I also believe that using a ccTLD is likely to affect rankings for that site outwith that country. But, is the opposite true? Will giving a site a ccTLD help improve its SEO in that country? If you have a global organisation, is it better to establish a series of country specific sites - ccTLD - or to purchase the country specific domains and point them to the.com (if only to stop cyber-squatting)? What if the company wanted to establish regional microsites that feature content about products only available within that region? Many thanks, Iain
International SEO | | iain0 -
Using Javascript to alter ONE or TWO keywords in International Site
Hi, What is the best way to target a language that has slight variations in it without actually targetting specific countries? Scenario: Ecommerce site that sells mobile phones in Spanish, initially created to target Spanish from Spain. We call a mobile phone a "movil" Now we want to target LatinAmerican users, which also use Spanish with variations, the most notable being mobile phone called "celular". We don't want to create specific sites via new ccTLDs, nor subdomains, no directories for each new country, and we want to avoid having two sites - one for spain, one for latinamerica- given that the only major difference is we say MOVIL in spain and CELULAR in LatinAmerica. What is Googles take if we simply decide to modify THAT specific keyword in each page where it is mentioned? Either by: a) Server based. IP Detect. that is, render the page with either one or the other term b) Javascript based. i.e. Have BOTH terms on all pages but using Javascript show/hide according to user preferences. c) Display the keywords with different font sizes/emphasis, depending on the visitor. Any ideas?
International SEO | | doctorSIM0 -
Best domain for spanish language site targeting ALL spanish territories?
hi, we're have a strong .com domain and are looking to launch a site for spanish speakers (ie latin america + spain). we already have various subdirectories for some foreign language sites (eg. ourdomain.co.uk, us.ourdomain.com, ca.ourdomain.com, ourdomainchina.com, ourdomainindia.com etc) we already have a B2B site ourdomain.com-es which will remain the same. I'm thinking best practice would be to launch translated copy for the following: ourdomain.com/es ourdomain.com/cl ourdomain.com/mx ourdomain.com/pt etc etc firstly is this the best option? secondly, i'm really interested to hear whether there is a less time/resource intensive route that would give us visibility in ALL spanish speaking territories? Also - if we go with just one of the above (eg ourdomain.com/cl) how likely are we to get traction in other spanish speaking territories? any help much appreciated!
International SEO | | KevinDunne0 -
Intentional redirect for international visitors to a website
We are doing PPC for a new client, and using Clicktale to improve conversion rates. However, Clicktale won't work because the client does not want international visitors looking at their website (competitive reasons! - yeah don't get me started...). They have a redirect on for all international visitors which points to a "coming soon..." page Are there any SEO implications on traffic in their own country (they currently do rank for terms)? I'd like to go back with a strong case for them removing any international redirect. Thank You
International SEO | | CleverClicks0