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 -
How can I make a list of all URLs indexed by Google?
I have a large site with over 6000 pages indexed but only 600 actual pages and need to clean up with 301 redirects. Haven't had this need since Google stopped displaying the url's in the results.
SEO Tactics | | aplusnetsolutions0 -
Solve Redirect Chains
I've gotten a few Redirect Issues that involve Redirect Chains, with the https:// version redirecting to the www. version and then redirecting to the right URL. Here is an example:
On-Page Optimization | | Billywig
Schermafbeelding 2021-12-07 om 11.04.32.png I've tried setting a direct redirect between the first and the last URL, but WordPress doesn't seem to allow that (it's overwritten). I've also tried checking the internal links to make sure that none of the links are the first one. They don't seem to be there. Does anyone have any tips on solving these Redirect Chains?0 -
Auto-Redirecting Homepage on Multilingual Site
The website has an auto-redirecting homepage on a multilingual site. Here is some background: User visits the site for first time > sent to javascript age verification page with country of origin selector. If selects "France" then served French page (.com/fr-fr/). If selects any other country, then served English page (.com/en-int/). A cookie is set, and next time the user visits the site, they are automatically served the appropriate language URL. 1st Question: .com/ essentially does not exist. It is being redirected to .com/en-int/ as this is the default page. Should this be a 301 redirect since I want this to serve as the new homepage? 2nd Question:. In the multilingual sitemap, should I still set .com/ as the hreflang="x-default" even though the user is automatically redirected to a language directory? According to Google, as just released here: http://googlewebmastercentral.blogspot.com/2014/05/creating-right-homepage-for-your.html "automatically serve the appropriate HTML content to your users depending on their location and language settings. You will either do that by using server-side 302 redirects or by dynamically serving the right HTML content. Remember to use x-default rel-alternate-hreflang annotation on the homepage / generic page even if the latter is a redirect page that is not accessible directly for users." So, this is where I am not clear. If use a 302 redirect of .com/ to either .com/en-int/ or .com/fr-fr/, won't I then lose the inbound link value and DA/PA of .com/ if I just use a 302? Note: there is no .com/ at this moment. Any advice is appreciated. Thanks,Alex
International SEO | | Alex.Weintraub0 -
301 juice from my old website to the new one?
Hi there! I am the proud webmaster of two websites, my old one: bioenergeticaconvicen.wordpress.com, currently with decent rankings in Google Spain (as bioenergeticaconvicen.com without the www, if i am not mistaken) on keywords like "Bioenergetica", "bioenergetica barcelona" "formacion en bioenergetica" "bioenergetica transpersonal" -You got the idea. 🙂 and my new one, "www.biomayeutika.org" , wordpress as well, with somehow decent rankings on "centro de bioenergetica" "bioenergetica" etc. It's a health an spiritual business: we dance, breath and mainly just feel our bodies without trying to control anything that happens. Cool 🙂 It's a very local business, aiming mostly for people from Barcelona/Catalonia but also for people from the rest of Spain. a) I guess my main question is just how to pass the old "SEO juice" to the new website. Currently, there's just a link on the old one pointing to the new one. b) Will I somehow merge the rankings of the two? c) How do i do a 301? which pages? With a wordpress plugin? Thanks very much in advance for your help. P.D.: Secondarily, I am open to suggestions on how to improve my SEO strategy (currently, none :)) I am very active in Facebook and have a few good videos and pictures, but I haven't really tried to do good SEO.
International SEO | | roybatti0 -
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 -
Alexa Rank and Linking from Article sites.
We are creating unique content and submitting our articles to article sites. I have some questions about the best way to go about this. 1. We are being very careful to create unique content for each submission - so we are not submitting the same article to multiple sites. Each submission is unique, so 1 article per 1 article directory. 2. When I did my research about these article sites at Alexa.com, I noticed that a lot of the article sites are ranking very well globally, but that a lot of them are #1 in Alexa for India. They are still ranked for other countries with very top ranking, for example, they may 9,000 Alexa rank in India and then 18,000 in the U.S. which is still very high. 3. We are trying to reach U.S. customers mostly, so I am wondering if we are still getting value by linking to these sites who have global reach (even though they are ranked best for India). I would think that this is very beneficial still, but I didn't want to get the wrong kind of traffic by getting links from sites that are primarily getting their traffic from India, even though they are also getting tons of traffic from the U.S. - I am assuming this is OK because a 18,000 or 19,000 Alexa Rank in the U.S. is still excellent and I will benefit by this. But I wanted to be sure. Feedback?
International SEO | | applesofgold0 -
I need suggestions. We're helping a big journal to improve their external links, even though they've a site with over 10 million monthly visits, their external links are week. Any suggestions?
Please let us know where we can find information on how to improve external links for a very big journal site. Thanks.
International SEO | | carloscontinua0