Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
Multilang site: Auto redirect 301 or 302?
-
We need to establish if 301 or 302 response code is to be used for our auto redirects based on Accept-Language header.
https://domain.com
30x > https://domain.com/en
30x > https://domain.com/ru
30x > https://domain.com/deThe site architecture is set up with proper inline HREFLANG.
We have read different opinions about this, Ahrefs says 302 is the correct one:
https://ahrefs.com/blog/301-vs-302-redirects/
302 redirect:
"You want to redirect users to the right version of the site for them (based on location/language)."You could argue that the root redirect is never permanent as it varies based on user language settings (302)
On the other hand, the lang specific redirects are permanent per language:IF Accept-Language header = en
https://domain.com > 301 > https://domain.com/en
IF Accept-Language header = ru
https://domain.com > 301 > https://domain.com/ruSo each of these is 'permanent'.
So which is the correct?
-
Hi Guys i am newer to SEO. my web with the 301 302 issue. anyone able help to fix it? will be high appreciated.
Internal URL
Yes
Full URL
https://myoffroadled.com/led-rocker-switch
HTTP status code
301 Moved permanently
First found at
Seed URL
Content type
text/html; charset=utf-8
Depth
0
Redirect URL
https://www.myoffroadled.com/led-rocker-switch/
Not crawled
Is redirect loop
No
Page rating
100 -
@fj66doneoiddpj In some cases users may have a reason for using the site in something other than their browser language.
For example, perhaps a shared device, or simply wishing to check a different localisation.
If your hreflang is working correctly, they should never see the "wrong" version anyhow.
But, there are pros and cons of course.
-
Thank you for the reply, 302 is also what we decided after many hours of reading.
The main reason for auto redirect is that we feel it's a better user experience as user will arrive the content target to his/her browser language. -
I would use a 302 here, just as an added insurance in case you ever accidentally serve Google the redirect.
However, I'm not a huge fan of auto redirects in general - they tend to cause issues for crawlers and users alike. Can you explain a bit more when/why the user gets redirected? Perhaps instead you could serve a country selection insterstitial if a user seems to be on the "wrong" variant?
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
-
Setting up international site subdirectories in GSC as separate properties for better geotargeting?
My client has an international website with a subdirectory structure for each country and language version - eg. /en-US. At present, there is a single property set up for the domain in Google Search Console but there are currently various geotargeting issues I’m trying to correct with hreflang tags. My question is, is it still recommended practise and helpful to add each international subdirectory to Google Search Console as an individual property to help with correct language and region tagging? I know there used to be properly sets for this but haven’t found any up to date guidance on whether setting up all the different versions as their own properties might help with targeting. Many thanks in advance!
International SEO | | MMcCalden0 -
GeoIP Redirects & hreflang
Hello, We believe we've had some issues with hreflang tags not remaining validated due to the implementation of geoIP redirects. Previously, if a user clicked a landing page on Google search that was not targeted for their territory, they would instantly be redirected to a sub path that targets their territory using geoIP redirects. We're planning to remove the initial geoIP redirects and have messaging that prompts the user to either stay on the page they've landed on, or be redirected to page that is right for their territory. However, if a user has selected to be redirected to a sub path that is targeted for their territory, they will have a cookie preference set for the IP location they've selected, and will continue to be redirected to their chosen sub path. My question is, will a crawler follow and trigger the geo preference cookie, which could potentially cause complexities in validating hreflang tags and ranking of content for the right market. Thanks.
International SEO | | SEONOW1230 -
Redirect to 'default' or English (/en) version of site?
Hi Moz Community! I'm trying to work through a thorny internationalization issue with the 'default' and English versions of our site. We have an international set-up of: www.domain.com (in english) www.domain.com/en www.domain.com/en-gb www.domain.com/fr-fr www.domain.com/de-de and so on... All the canonicals and HREFLANGs are set up, except the English language version is giving me pause. If you visit www.domain.com, all of the internal links on that page (due to the current way our cms works) point to www.domain.com/en/ versions of the pages. Content is identical between the two versions. The canonical on, say, www.domain.com/en/products points to www.domain.com/products. Feels like we're pulling in two different directions with our internationalization signals. Links go one way, canonical goes another. Three options I can see: Remove the /en/ version of the site. 301 all the /en versions of pages to /. Update the hreflangs to point the EN language users to the / version. **Redirect the / version of the site to /en. **The reverse of the above. **Keep both the /en and the / versions, update the links on / version. **Make it so that visitors to the / version of the site follow links that don't take them to the /en site. It feels like the /en version of the site is redundant and potentially sending confusing signals to search engines (it's currently a bit of a toss-up as to which version of a page ranks). I'm leaning toward removing the /en version and redirecting to the / version. It would be a big step as currently - due to the internal linking - about 40% of our traffic goes through the /en path. Anything to be aware of? Any recommendations or advice would be much appreciated.
International SEO | | MaxSydenham0 -
How to best set up international XML site map?
Hi everyone, I've been searching about a problem, but haven't been able to find an answer. We would like to generate a XML site map for an international web shop. This shop has one domain for Dutch visitors (.nl) and another domain for visitors of other countries (Germany, France, Belgium etc.) (.com). The website on the 2 domains looks the same, has the same template and same pages, but as it is targeted to other countries, the pages are in different languages and the urls are also in different languages (see example below for a category bags). Example Netherlands:
International SEO | | DocdataCommerce
Dutch domain: www.client.nl
Example Dutch bags category page: www.client.nl/tassen Example France:
International domain: www.client.com
Example French bags category page: www.client.com/sacs When a visitor is on the Dutch domain (.nl) which shows the Dutch content, he can switch country to for example France in the country switch and then gets redirected to the other, international .com domain. Also the other way round. Now we want to generate a XML sitemap for these 2 domains. As it is the same site, but on 2 domains, development wants to make 1 sitemap, where we take the Dutch version with Dutch domain as basis and in the alternates we specify the other language versions on the other domain (see example below). <loc>http://www.client.nl/tassen</loc>
<xhtml:link<br>rel="alternate"
hreflang="fr"
href="http://www.client.com/sacs"
/></xhtml:link<br> Is this the best way to do this? Or would we need to make 2 site maps, as it are 2 domains?0 -
Can you target the same site with multiple country HREFlang entries?
Hi, I have a question regarding the country targeting aspect of HREFLANG. Can the same site be targeted with multiple country HREFlang entries? Example: A global company has an English South African site (geotargeted in webmaster tools to South Africa), with a hreflang entry targeted to "en-za", to signify English language and South Africa as the country. Could you add entries to the same site to target other English speaking South African countries? Entries would look something like this: (cd = Congo, a completely random example) etc... Since you can only geo-target a site to one country in WMT would this be a viable option? Thanks in advance for any help! Vince
International SEO | | SimonByrneIFS0 -
Internationalization and 302 redirects
Hi, We're thinking in an internationalization process for a travel webpage. We'd like to use one domain (.com) in TV and press marketing and have several domains with each country ccTLD domain. We've shown that for example Tripadvisor makes a 302 redirect if you connect to tripadvisor.com and you are in another country. But we've detected aswell, that if you use the Browser Agent Google Bot, it didn't. It appears to be a cloaking, but really they're redirecting the users to the best places for them, and detecting Googlebot for not make the redirect, they ensures that it indexes well all the place. Booking.com makes something similar but with the same domain, detecting if you're Googlebot or not. Do you think that this is a danger thing if you're not as big as Tripadvisor? They makes this redirection by level server, could be safest to do with javascript? if we do with javascript, Google will take this path instead of read the page? Thanks!
International SEO | | robertorg0 -
Sub-domains or sub-directories for country-specific versions of the site?
What approach do you think would be better from an SEO perspective when creating country-targeted versions for an eCommerce site (all in the same language with slight regional changes) - sub-domains or sub-directories? Is any of the approaches more cost effective, web development-wise? I know this topic's been under much debate and I would really like to hear your opinion. Many thanks!
International SEO | | ramarketing0 -
Targeting Different Countries... One Site or Separate?
I have a client who has 3 ecommerce sites. They are somewhat differentiated but for the most part sell the same stuff. Luckily 2 of them are quite authoritative, old and rank reasonably well. Most of the visitors and sales come from the US. He wants to start targeting Europe, Mexico and Canada. What are your suggestions for doing this? Are we better targeting on the main domains? Not really sure how to do that? Should we use a subdomain and a new store front for each geo? Should we use a .co.uk .co.mx and .co.ca each with a unique storefront? It looks like we are moving to a Magento platform so setting up multiple storefronts on a single database is not a big issue. Anyone have any experience with this?
International SEO | | BlinkWeb0