Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does googlebot keep sessions when crawling?

When googlebot crawls pages does it have session? For example I am storing some variables on the session and using them in my site's pages. When googlebot crawls these pages will I still have the session-variables? In my global.asax I am storing some variables on the session at session start. Will I have any problem with Google bot?

like image 667
MonsterMMORPG Avatar asked Oct 31 '11 19:10

MonsterMMORPG


People also ask

What is the function of Googlebot?

Googlebot is a web crawling software search bot (also known as a spider or webcrawler) that gathers the web page information used to supply Google search engine results pages (SERP). Googlebot collects documents from the web to build Google's search index.

Can Googlebot crawl my site?

However, starting November 2020, Googlebot may crawl sites that may benefit from it over HTTP/2 if it's supported by the site. This may save computing resources (for example, CPU, RAM) for the site and Googlebot, but otherwise it doesn't affect indexing or ranking of your site.

What is a Googlebot crawl?

Googlebot is the generic name for Google's web crawler. Googlebot is the general name for two different types of crawlers: a desktop crawler that simulates a user on desktop, and a mobile crawler that simulates a user on a mobile device.

Does Googlebot store cookies?

“Googlebot also doesn't keep a cookie.


2 Answers

Googlebot actively tries to avoid sessions and does not support cookies. From First date with the Googlebot: Headers and compression (March 2008)

I usually avoid cookies (so no "Cookie:" header) since I don't want the content affected too much by session-specific info. And, if a server uses a session id in a dynamic URL rather than a cookie, I can usually figure this out, so that I don't end up crawling your same page a million times with a million different session ids.

I imagine most regular search engine bots will be similar in this respect. Google is trying to build an index of unique URLs. The URL is the unique key that identifies a unique page of content. Cookies (and sessions) are not passed when a user clicks a link in the SERPS. Google is primarily indexing pages, not sites.

like image 161
MrWhite Avatar answered Sep 18 '22 23:09

MrWhite


The answer to one of your question is: yes, you will have problems with Google bot.

Generally we've encountered two types of issues with google bot:

  1. it sometimes does not retain HTTP cookies between requests. Our application relies on custom cookies and the there were plenty of google bot requests caught to carry no cookies at all.

  2. it makes long breaks between consecutive requests. For example, it retrieves your page and asks for it's scripts later on.

Both will cause troubles with your session. First - you need a precise ASPNETSessionID cookie to be passed between requests. Googlebot will probably sometimes fail to do that. Second - if there's a long timespan between requests, your session is going to terminate even if the cookie is there.

like image 39
Wiktor Zychla Avatar answered Sep 18 '22 23:09

Wiktor Zychla