Forum Moderators: coopster

Message Too Old, No Replies

Shop using sessions how to make Google compliant

Do I have to cloak?

         

Ruben

5:30 pm on Sep 26, 2004 (gmt 0)

10+ Year Member



I have built a shop using php/mysql and especially the technique sessions. Now I was wondering how I can get my products listed in Google. I have read some about the fact that pages using sessions can't be indexed by Googlebot, because of the sessions. Do I have to cloak now doing something like

if (Googlebot) {
// session_start() not included
etc..
} else {
session_start();
etc
}

Or doesn't it make sense at all? So does Googlebot only have problems if I propagate the session id with .SID after every url. (I don't use .SID)

Birdman

5:37 pm on Sep 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One way would be to only start the session when a user adds an item to the shopping cart. Use a form for your "add to cart" link and then Googlebot will never see session ids because it doesn't submit forms.

Birdman

mincklerstraat

6:00 pm on Sep 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I like Birdman's idea best. Next possibility, if this doesn't work for you - use ini_set() and set the value of the php configuration option to use *only* cookie-based sessions, and put a notice on your shopping cart that they've gotta have cookies enabled (shoppers should be used to this kind of thing). You'll find this in the main php.net page on sessions.

ergophobe

7:19 pm on Sep 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If Birdman's method doesn't work for you, you could also try checking the user agent and only start sessions if it doesn't look like an important search engine bot.

It's a bit more complex as you would have to keep a list of user agents for which you don't start a session, but it would allow users who block cookies to shop without issues.

Ruben

9:10 pm on Sep 29, 2004 (gmt 0)

10+ Year Member



So Googlebot doesn't have problems with cookies? Then this is maybe an option.

And is there a website where I can see how Google reacts at my site with this option set?