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.
Language Detection redirect: 301 or 302?
-
We have a site offering a voip app in 4 languages. Users are currently 302 redirected from the root page to /language subpages, depending on their browser language.
Discussions about the sense of this aside: Is it correct to use a 302 redirect here or should users be 301 redirected to their respective languages? I don't find any guideline on this whatsoever...
-
My pleasure!
-
Hi Marcus
Thanks for your great answer! This makes a lot of sense and I agree that 303 seems to be the suitable response if they were used "semantically"...
I do not agree with the general setup they made with this user detection (particularly since the root URL is not accessible but gets redirected). So I'm just out for a quick fix here for something that is not set up optimally in general.
I think I will stick with the 302 - it's not so easy to decide, but in such cases I think what Google itself does is a good reference. So thanks for pointing that out!
We won't get link juice from the domain's root using 302s (or less), but I will try to solve this otherwise by actually making that URL accessible.
Thanks a lot!
-
Hey Philipp
Okay, SEO aside here and assuming folks are landing on your site and not on the section of the site that is targeted to their location / language (which is a whole other discussion but not your question as far as I can tell) then you want to redirect these users to the correct language pages.
So, we have two options here:
- HTTP 301 - Moved Permanently: Now I don't feel this is correct. The resource has not moved, it is just not correct for this user based on their language preference.
- HTTP 302 - Found: This is used to indicate the resource has temporarily moved to another location so is maybe more suitable as results from page A will not be completely ignored
In fact, if you dig into the HTTP status codes documentation a better option here would seemingly be a 303 which is classified as 'The response to the request can be found under another URI' and for my money that is more suitable. But, problem is, no one seems to use the 303 redirect and everyone seems to use the 302 in it's place.
So, I ask myself, what does Google do? When I visit www.google.com from the UK I am always redirected to the www.google.co.uk site. Is this a 301, 302, 303 or something else entirely? So, I checked quickly in webbug (or you can do it Chrome by looking at the Network tab in Tools > Developer Tools > Network Tab) and it redirects with a 302 status code.
Request: HEAD / HTTP/1.1
Host: www.google.com
Connection: close
Accept: /
User-Agent: WebBug/5.0Response: HTTP/1.1 302 Found
Location: http://www.google.co.uk/So, I am not sure there is a definitive answer as from a search engine perspective we would want to folks landing on the right page due to our geo location and language targeting but that does not escape the need to show people the content in the correct language.
If this was me and I was dead set on a redirection I would go with a 302. I can't claim that is an authoritative answer but it is certainly my opinion based on my research here.
I guess the alternative would be to maybe detect the users language settings and load a pop up that then allows them to select and redirect so it is not done at the request / response level but rather a choice the user makes themselves (then maybe cookies or other options could be used to deal with language for those users on subsequent visits). In the UK http://www.babycenter.com/ does this and it pops up asking me which version of the site I would like to visit (choice is always a good thing).
Possibly a good question to ask in the Google Webmaster Help Forum: http://productforums.google.com/forum/#!forum/webmasters as you will often get a Googler pop up to answer specific questions or this question may well have been asked before (albeit in a different way). If this is not search focused then really it comes down to what you think works best for your users.
Hope that helps!
MarcusSome further reading if it helps:
- http://support.google.com/webmasters/bin/answer.py?hl=en&answer=182192
- http://support.google.com/webmasters/bin/answer.py?hl=en&answer=62399
- http://www.mattcutts.com/blog/seo-advice-discussing-302-redirects/
- http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
- http://en.wikipedia.org/wiki/HTTP_302
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
-
Using a Reverse Proxy and 301 redirect to appear Sub Domain as Sub Directory - what are the SEO Risks?
We’re in process to move WordPress blog URLs from subdomains to sub-directory. We aren’t moving blog physically, but using reverse proxy and 301 redirection to do this. Blog subdomain URL is https://blog.example.com/ and destination sub-directory URL is https://www.example.com/blog/ Our main website is e-commerce marketplace which is YMYL site. This is on Windows server. Due to technical reasons, we can’t physically move our WordPress blog to the main website. Following is our Technical Setup Setup a reverse proxy at https://www.example.com/blog/ pointing to https://blog.example.com/ Use a 301 redirection from https://blog.example.com/ to https://www.example.com/blog/ with an exception if a traffic is coming from main WWW domain then it won’t redirect. Thus, we can eliminate infinite loop. Change all absolute URLs to relative URLs on blog Change the sitemap URL from https://blog.example.com/sitemap.xml to https://www.example.com/blog/sitemap.xml and update all URLs mentioned within the sitemap. SEO Risk Evaluation We have individual GA Tracking ID and individual Google Search Console Properties for main website and blog. We will not merge them. Keep them separate as they are. Keeping this in mind, I am evaluating SEO Risks factors Right now when we receive traffic from main website to blog (or vice versa) then it is considered as referral traffic and new cookies are set for Google Analytics. What’s going to happen when its on the same domain? Which type of settings change should I do in Blog’s Google Search Console? (A). Do I need to request “Change of Address” in the Blog’s search console property? (B). Should I re-submit the sitemap? Do I need to re-submit the blog sitemap from the https://www.example.com/ Google Search Console Property? Main website is e-commerce marketplace which is YMYL website, and blog is all about content. So does that impact SEO? Will this dilute SEO link juice or impact on the main website ranking because following are the key SEO Metrices. (A). Main website’s Avg Session Duration is about 10 minutes and bounce rate is around 30% (B). Blog’s Avg Session Duration is 33 seconds and bounce rate is over 92%
Intermediate & Advanced SEO | | joshibhargav_200 -
301 Redirect in breadcrumb. How bad is it?
Hi all, How bad is it to have a link in the breadcrumb that 301 redirects? We had to create some hidden category pages in our ecommerce platform bigcommerce to create a display on our category pages in a certain format. Though whilst the category page was set to not visable in bigcommerce admin the URL still showed in the live site bread crumb. SO, we set a 301 redirect on it so it didnt produce a 404. However we have lost a lot of SEO ground the past few months. could this be why? is it bad to have a 301 redirect in the breadrcrumb.
Intermediate & Advanced SEO | | oceanstorm0 -
Do I need to add the actual language for meta tags and description for different languages? cited for duplicate content for different language
Hi, I am fairly new to SEO and this community so pardon my questions. We recently launched on our drupal site mandarin language version for the entire site. And when i do the crawl site, i get duplicate content for the pages that are in mandarin. Is this a problem or can i ignore this? Should i make different page titles for the different languages? Also, for the metatag and descriptions, would it better in the native language for google to search for? thanks in advance.
Intermediate & Advanced SEO | | lynetteboss0 -
301 Redirecting from domain to subdomain
We're taking on a redesign of our corporate site on our main domain. We also have a number of well established, product based subdomains. There are a number of content pages that currently live on the corporate site that rank well, and bring in a great deal of traffic, though we are considering placing 301 redirects in place to point that traffic to the appropriate pages on the subdomains. If redirected correctly, can we expect the SEO value of the content pages currently living on the corporate site to transfer to the subdomains, or will we be negatively impacting our SEO by transferring this content from one domain to multiple subdomains?
Intermediate & Advanced SEO | | Chris81980 -
Geoip redirection, 301 or 302?
Hello all Let me first try to explain what our company does and what it is trying to achieve. Our company has an online store, sells products for 3 different countries, and two languages for each country. Currently we have one site, which is open to all countries, what we are trying to achieve is make 3 different stores for these 3 different countries, so we can have a better control over the prices in each country. We are going to use Geoip to redirect the user to the local store in his country. The suggested new structure is to add sub-folders as following: www.example.com/ca-en
Intermediate & Advanced SEO | | ajarad
www.example.com/ca-fr
www.example.com/us-en
... If a visitor is located outside these 3 countries, then she'll be redirected to the root directory www.example.com/en We can't offer to expand our SEO team to optimize new pages for the local market, it's not the priority for now, the main objective now is to be able to control the prices for different market. so to eliminate the duplicate issue, we'll use canonical tags. Now knowing our objective from the new URL structure, I have two questions: 1- which redirect should we use? 301, 302?
If we choose 301, then which version of the site will get the link juice? (i.e, /ca-en or /us-en?)
if we choose 302, then will the link juice remain in the original links? is it healthy to use 302 for long term redirections? 2- Knowing that Google bots comes from US-IP, does that mean that the other versions of the site won't be crawled (i.e, www.example.com/ca-fr), this is especially important for us as we are using AdWords, and unindexed pages will effect our quality score badly. I'd like to know if you have other account structure in your mind that would be better than this proposed structure. Your help is highly highly appreciated.
Thanks in advance.0 -
Does a 302 redirect pass penalties?
I'm having problems finding a definitive answer to this question, there is a lot of rumour and gossip out there but nothing I can rely on. I'm working with a site that received an unnatural links notice followed by a massive drop in search traffic. Looking at the link profile it's pretty much jacked beyond repair and I have recommended that we move over to a fresh domain. However, it's an established brand with many more sources of traffic than organic search. There's no way we can burn all their repeat visits, loyal customers, brand recognition that they've built up over the years so I want to redirect from the old domain to the new. This is not to try and make any SEO gain from the previous site, frankly we don't give a crap about that. We just want to maintain the brand. A 302 is a temporary redirect, this will be a permanent move BUT a 301 will pass on the penalty. So can we safely use a 302 redirect in this situation or is there a better alternative (meta refresh?) Thanks for your help! MB.
Intermediate & Advanced SEO | | MattBarker0 -
Any way to find which domains are 301 redirected to competitors' websites?
By looking at the work from an SEO collegue it became clear that his weak linkbuilding graph probably is not the cause for his good rankings for a pretty competitive keyword. (also no social mentions where found) I was wondering what it could be, site structure and other on page optimization factors seems to be ok and I don't think there will be exceptionally good or bad user behavior... Finally I looked at the competitors and found that they have more links, better content en better design, so I got a little stuck. The only reason I can think of is that he is doing 301 redirects (or is rel=canonical tags). Is there a way to trace these redirects back to the source in order to include this important variable in your competitor research? thnx
Intermediate & Advanced SEO | | djingel10 -
301 redirect from .html to non .html?
Previously our site was using this as our URL structure: www.site.com/page.html. A few months ago we updated our URL structure to this: www.site.com/page & we're not using the .html. I've read over this guide & don't see anywhere that discusses this: http://www.seomoz.org/learn-seo/redirection. I've currently got a programmer looking into, but am always a bit weary with their workarounds, as I'd previously had them cause more problems then fix it. Here is the solution he is looking to do: The way that I am doing the redirect is fine. The problem is of where to put the code. The issue is that the files are .html files that need to be redirected to the same url with out a .html on them. I can see if I can add that to the 404 redirect page if there is one inside of there and see if that does the trick. That way if there is no page that exists without the .html then it will still be a 404 page. However if it is there then it will work as normal. I will see what I can find and get back. Any help would be greatly appreciated. Thanks, BJ
Intermediate & Advanced SEO | | seointern0