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
-
Advise on the right way to block country specific users but not block Googlebot - and not be seen to be cloaking. Help please!
Hi, I am working on the SEO of an online gaming platform - a platform that can only be accessed by people in certain countries, where the games and content are legally allowed.
International SEO | | MarkCanning
Example: The games are not allowed in the USA, but they are allowed in Canada. Present Situation:
Presently when a user from the USA visits the site they get directed to a restricted location page with the following message: RESTRICTED LOCATION
Due to licensing restrictions, we can't currently offer our services in your location. We're working hard to expand our reach, so stay tuned for updates! Because USA visitors are blocked Google which primarily (but not always) crawls from the USA is also blocked, so the company webpages are not being crawled and indexed. Objective / What we want to achieve: The website will have multiple region and language locations. Some of these will exist as standalone websites and others will exist as folders on the domain. Examples below:
domain.com/en-ca [English Canada]
domain.com/fr-ca [french Canada]
domain.com/es-mx [spanish mexico]
domain.com/pt-br [portugese brazil]
domain.co.in/hi [hindi India] If a user from USA or another restricted location tries to access our site they should not have access but should get a restricted access message.
However we still want google to be able to access, crawl and index our pages. Can i suggest how do we do this without getting done for cloaking etc? Would this approach be ok? (please see below) We continue to work as the present situation is presently doing, showing visitors from the USA a restricted message.
However rather than redirecting these visitors to a restricted location page, we just black out the page and show them a floating message as if it were a model window.
While Googlebot would be allowed to visit and crawl the website. I have also read that it would be good to put paywall schema on each webpage to let Google know that we are not cloaking and its a restricted paid page. All public pages are accessible but only if the visitor is from a location that is not restricted Any feedback and direction that can be given would be greatly appreciated as i am new to this angle of SEO. Sincere thanks,0 -
Domain forwarding or 301 redirects?
I have two domains and one of them is being phased out. Currently, there are some 301 redirects in place for the main pages but I was wondering if it would be better / easier to just set up domain forwarding? I can't seem to find anywhere that tells you the "type" domain forwarding, is it 301? 302? etc. Thanks,
SEO Tactics | | BrandonDebison0 -
Tracking International Keywords
Hi I haven't had much luck tracking keywords on my international sites let alone discovering new keywords. What are some strategies/suggestions to accomplishing this? Currently I have campaigns set-up for the UK, Germany, France, and China in additional to our main US-Canada campaign.
International SEO | | Julie.P0 -
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 -
Site Ranking in all countries except USA
Hello, I have a site www.apdermatology.com in is ranking #1 for
International SEO | | element8design
"Dermatologist Chelsea Mi" "Dermatologist Chelsea Michigan" In Google in Canada, UK, Australia, Etc.. But in the USA it is on the 4th+ Page, it has been this way for weeks if not months. And does not seem to come up. I originally thought maybe that google was penalizing the site although, it comes up in all other counties. Does anyone have any recommendations how to resolve this, or what the problem may be? Thanks.0 -
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 -
Geo Targeting for Similar Sites to Specific Countries in Google's Index
I was hoping Webmaster Tools geo targeting would prevent this - I'm seeing in select google searches several pages indexed from our Australian website. Both sites have unique TLDs: barraguard.com barraguard.com.au I've attached a screenshot as an example. The sites are both hosted here in the U.S. at our data center. Are there any other methods for preventing Google and other search engines from indexing the barraguard.com.au pages in searches that take place in the U.S.? dSzoh.jpg
International SEO | | longbeachjamie0