Session IDs and URL Variables

Session IDs are legitimate ways to keep user sessions, as some web users have their browser cookies disabled. Many web applications use session IDs. These are unique identifiers that map each user’s web session to the current application state. Even Google admits that session IDs are not a great idea. Lots of web users do not allow cookies on their web browsers. This scenario forces web applications to store the session IDs as part of the URLs.

Here are some examples of URLs with session IDs and/or other variables:

  • http://www.abcde.com/product.do?id=123&page=201&items=10&

  • http://www.abcde.com/product.php?id=fji5t9io49fk3et3h4to489

  • http://www.abcde.com/product.cgi?sid=485fjh4toi49f4t9iok3et3

  • http://www.abcde.com/product.asp?sessionid=h49fk5et3489fji4t9io4to

The basic problem with session IDs stems from the fact that the ID will always be different the next time the web spiders hit your website, thereby giving the impression of a different page (which could be considered as duplicate content).

To help search engine spiders, you can attempt to detect web spider signatures and disable the usage of session IDs in your URLs. Doing so may also get you into trouble, though, as you are now handling web spiders in a different fashion when compared to regular human visitors. This could be considered search engine cloaking.

The situation is a bit easier to handle when it comes to other URL parameters, as long as there are not too many of them. Many website owners deal ...

Get SEO Warrior now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.