3

I track my users using GET parameters to be able to do it even if they don't allow the use of cookies. And to do that, I need to do 2 redirections the first time the user hits my page.

I am having some problems (Googlebot requires 19 redirections) and found that you cannot use Session ID for crawlers in the GET parameters so, they recommend to detect if the user is a robot and, in this case, do not redirect and do not use any Session ID.

I can do it perfectly fine but... wouldn't Google detect the redirection is made for humans and not for Googlebot? And if they do, wouldn't that count as cloaking?

What should I do?

  • Keep in mind that Google test sites from outside its own network to detect cloaking. – closetnoc Jun 20 '16 at 1:14
  • That's why I am asking – Kenny Lajara Jun 20 '16 at 1:44
  • You will never know if Google visits your site from outside of their network. While I do not exactly understand what you are doing, I am worried that you might present on thing to Google and another thing to users even with all of the right intent. I wish I had an answer for you. I just wanted to warn you in case you did not know. Cheers!! – closetnoc Jun 20 '16 at 4:26
  • Why are you going through the effort of supporting cookies turned off? Less than 1% of visitors turn off cookies entirely. Every browser supports them. If a user tries to live without any cookies they quickly find out that many sites don't work at all. It is painful for users to do without cookies. – Stephen Ostermiller Jun 20 '16 at 10:40
  • @closetnoc I present exactly the same content, I but I want not to track robots because the tracking function makes Google redirect 19 times before they see the content. – Kenny Lajara Jun 21 '16 at 3:59
1

"Cloaking" in this situation would be fine. When the user agent contains bot|crawl|slurp|spider you should not use session id parameters or check for cookies. You are delivering the same content to users and bots. Google won't have a problem with this particular cloak.

I use a similar technique for deciding whether or not to use Data URI for the images on my site. I treat all bots the same as IE 7 and earlier which cannot handle Data URIs. Technically it is cloaking, but all bots get the same data and would render the same pixels on the screen as users. They just get that data through different technical means.

It might also be worth exploring different ways of handling the issue. If it were my site I might set cookies, and then use JavaScript like this on the links: onclick="if(!document.cookie.indexOf('session')this.href+='?session=abcdef1234';" Googlebot doesn't execute the onclick when following links, so it would still be able to crawl your site without parameters.

When you are using session parameters, you should log into Google Search Console and tell Google to ignore them. Open the URL Parameters Tool or view the crawl parameters documenation. You will want to add your session parameter and set it to "Doesn't effect page content (ex. tracks usage)".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.