: How to suppress PHPSESSID in URL for Googlebot? I use cookie based sessions, and they work for normal interaction with our site. However, when Googlebot comes crawling our PHP framework, Yii,
I use cookie based sessions, and they work for normal interaction with our site. However, when Googlebot comes crawling our PHP framework, Yii, needs to append ?PHPSESSID to each URL, which doesn't look that good in SERP.
Any ways to suppress this behavior?
PS. I tried to utilize ini_set('session.use_only_cookies', '1');, but it does not work.
PPS. To get an impression of the SERP, they look like this:
www.google.com/search?q=site:wwwdup.uni-leipzig.de+inurl:jobportal
More posts by @Hamaas447
3 Comments
Sorted by latest first Latest Oldest Best
See Webmaster Tools: Updates to Search queries, Parameter handling and Messages at the Google Webmaster Central blog for instructions to suppress the PHPSESSID parameter in search results.
On the server-side, you should look into a way to prevent every hit from creating a session - session management is expensive server-side and it is generally undesirable to initiate sessions unless the content presented is dependent upon session data (as would hopefully not be the case with a search engine crawler).
Try adding CHttpSession::setUseTransparentSessionID(true) (api) somewhere in your Yii app, if it doesn't already exist.
I don't like visible session IDs either (triggers the flashbacks of PHP3 vs. broken IE cookies), so I always set it. I'm not 100% sure it'll fix the issue, but I haven't seen any session IDs sneak into search results for the few Yii apps I've built.
Have you tried using rel="canonical"? This link should help explain, www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139394.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.