Forum Moderators: open
My site starts using session variables as soon as a visitor requests the default page and it is important that it does this on the first page.
Does anyone know if this affects how my site will get spidered? I have tried to optimize the site for search engines, but will all this work have gone to waste if I keep the session variables in the URL?
I know you can pass a session variable in the URL with PHP, so maybe you guys can help too?
[example.com...]
It has no problem accessing the URL if the session has expired. It either assigns the session to that ID, or creates a new one.
What do you think?
so, your page will be treated like it wasn't there anymore and be removed from the index....and as someone mentioned it could be treated as duplicate content.
Thing is, how many visitors do you think I am going to restrict from using the site if I use cookies for the session state?
I had this dilemma a while back when I was creating a large site for the BBC. I ended up rolling my own uri based session management similar to what ASP gives you out the box. And I regretted it. The down sides are security, spidering and the performance overhead of dynamically adding the session to every link in a page, in that order.
Strictly speaking you are giving a spider the perception that you have a bunch of directories on the site that are large Hex numbers.
Your goal (with google anyway) is to gather pagerank for a particular URI. And if all your URI's are different, you're up S**t creek. Also if, for example, google starts crawling pages based on data it gets from the toolbar, you're going to be in trouble.
There's a reason that sites like this one try to avoid putting anything unneccesary in the URI, including a query string. They try to make everything look like a static HTML page even if it is completelly dynamic. It's more spider friendly that way.
Just bite the bullet and use cookies. Most large sites, including google, that have sessions management require cookies.
More importantly, URI based session management is a security risk. Anyone who sees that URI, including a webmaster who see's a referer, can hijack that session. And believe me, I regularly tail my logs watching users as they arrive at the site. If I saw something that looked interesting, I might just visit it for kicks.
There are a few things you can do to make it *slightly* more secure, like killing the session if the referer does not match your site. But many browsers have referer's disabled, so that's not reliable.
Mark.