Announcement Announcement Module
No announcement yet.
SEO and sessionids Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SEO and sessionids

    I noticed Google started indexing our webpages with sessionid in the URLs. So every URL has ";jsessionid=5F0DE4B89E43521C5AD682FB6D3720" between the servlet path and the query string (if one exists). I understand this is very bad as multiple spiders traverse the site and think that you have duplicate pages, aside from ugly URLs.

    I really would've thought Google, of all search engines, would be smarter than this. Especially considering the ;jsessionid= is pretty standard in the Java world, which is pretty big on the web. So does Spring have a solution? What is the right solution? Are we all supposed to disable URL rewriting for session ids? I'd hate to give up on users without cookies. Is it acceptable, and does Spring have an easy implementation, to only disable URL rewriting if a search engine bot is detected?

    I'm using standard Spring webmvc with jsp.

  • #2
    No response to this? I'd think this would be very important to Spring and webmvc users. So I've read up a lot on this issue and disabling session ids in URLs seems to be necessary for good SEO, at least for search engine bots, particularly googlebot. But Spring nor Tomcat or most other Java application servers, provide any mechanism for disabling the session ids in URLs! Of course, you don't have to use JSP's c:url tag or other web frameworks' equivalents. But you might want the context and already have a ton of code with it. Plus you might want session ids for visitors without cookies, just not search engines.

    It would be really nice if Spring supported this, but it appears you can write a filter to override the HttpServletResponse.encodeUrl methods. I'll figure out how to do this...