Should i header 301 for this redirection and how will google index be influenced?
Asked Answered
P

5

6

I have an application that when you go to http://website.com it automatically redirects to http://website.com/en since no language was detected.

Is it neccesary to use a redirect 301 for this redirection? What about for google indexing? Will my google indexing be affected by this redirection?

Parang answered 14/6, 2017 at 20:22 Comment(2)
Are you asking how redirects work?Albright
@Albright updated questionParang
D
2

This is a complex set of decisions, and Google is pretty secretive about how page rank works.

I'm assuming you have a multilingual site - there's http://website.com/en, http://website.com/es, http://website.com/fr etc. I'm also assuming you want Google to index all those sites, and recognize them as being in those languages.

You might start by reading what Google has to say.

A 301 is a permanent redirect. It says "whoever you are, go here instead of there". That's bad for search engine crawlers - they aren't "English", or "Spanish". So, work out what you want the user experience to be. Some people say "show a landing page, ask the user to choose which language they want"; others say "use browser language detection and automatically redirect". If you redirect, do it via a 302. Maybe do both - redirect if you're certain, show a landing page if you're not.

For SEO, make sure you have a sitemap that allows Google to find all content in all languages, and link different language versions to each other so Google can understand the relationship.

Dusen answered 13/7, 2017 at 8:34 Comment(0)
C
0

As soon as you start using 301 redirects, you can never go back. It creates a permanent layer of abstraction which adds unnecessary complication to your site (how is this different from not redirecting and serving the default content at http://website.com ?).

Using a redirect at all impacts performance. Although google say that performance impacts rankings, the extent is relatively small in practice.

The preferred language is intended as a hint. By all means default to the preferred language, but if you want to provide a good user experience then let the user choose if they want to change the language.

A further consideration is that google will only index the content it can reach. If you make the choice of languages navigable without relying on dynamic serverside redirection/proxying or clientside javascript, then google will index the non-english content too.

Finally, google use a mystical mix of factors in deciding on a page rank. Using a redirect formerly had an automatic impact - but this is no longer the case. (other than the performance overhead).

So given that you appear to be blocking google from accessing large parts of your site, it is bad engineering practice and makes for a poor user experience I would strongly recommend you take a different approach. If the architecture of your site makes it difficult to implement this without a redirect then use a non-permanent redirection which can be overridden by the user.

Cottier answered 12/7, 2017 at 22:32 Comment(0)
C
0

If you have multiple languages on your website, then using a a part of the URL to indicate that language is the preferred way of doing it. It's even in the Google documentation on Multi-regional and multilingual sites.

Do not use a session to set the user language and show different content (language) on the same URL! A single URL should always show the same content, no matter who is browsing or however he got there.

Also as the link from symcbean shows, 3xx redirect has no impact on pagerank.

Make sure however that your site also includes an option to switch between languages. So that /en/ also links to /nl/ and /de/ or whatever languages you have. This way google (and users, more importantly) can also access the content in another language.

Conclusion: If you use http://website.com as a way to determine the language and then redirect to http://website.com/en/, http://website.com/nl/, http://website.com/de/ or whatever language, that is the preferred way of doing it on a single domain. Only thing better would be website.com, website.nl and website.de

Craftsman answered 13/7, 2017 at 8:14 Comment(0)
J
0

It seems your application already does some kind of redirection. You need to check what kind of redirection is that (301 or 302). If it's 302 Redirect, then YES, it can affect your google rankings and you should use 301 Redirect instead.

302 Redirect (aka: a temporary redirect) should be used if you want to redirect your site visitors to another webpage but you plan to bring the redirected page back after some time.

Jernigan answered 19/7, 2017 at 15:10 Comment(0)
S
0

I reverse engineered Google Bots behavior for my own studies, so here are my own insights on how they currently work. Might not be accurate, studies were made in 2015, but I doubt it changed that much.

Google Bots will hit your / and will then follow the 301, 302, etc. redirections. Semantically 301, 302 and cons. are different, but I bet that Google does not really care for the most common types, due to the wide range of administrative/programming errors/lazyness that can be encountered on the world wild web..

They will follow up to a maximum of n redirections, with n being 5 if I remember correctly, until they hit a 200 or abandon.

After some time Google bots will come back on your page, at first a little bit more than usual (a few times in a couple of hours), then very slowly (once every few hours). They probably try to analyze how dynamic your content is. Note that they will accurately reference the redirected URLs of your website content, even after multiple redirections (I verified my links in the search engine).

By analyzing Google download agents (API, Google Docs...), I am pretty sure that Google uses libcurl for most of their active requests and did not implement a black magic-based solution. Libcurl natively implements redirection for all of the 3xx message suite.

For SEO optimizations consider using sitemap.xml which I know they rely on.

If you are really paranoid, then feed GoogleBots with the content you want to:

  1. Implement an index.php on /

  2. Detect user-agent, if not a Google Bot -> redirects to /en

  3. If a Google Bot: deliver the content you want

Google Bots user agents are officially documented here.

If you are not trusting the User Agent enough, try performing a reverse DNS resolution of sollicitor, proper handling of the results is also documented by Google.

You can reverse DNS the sollicitor with gethostbyaddr() but it might slow down the loading process, or you can trust a crawlers IP database. I would recommend none of these, the User Agent control should be ok.

Scalable answered 19/7, 2017 at 17:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.