Mobile app version of vmapp.org
Login or Join
Hamaas447

: 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,

@Hamaas447

Posted in: #CleanUrls #Google #Indexing #Php #Url

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

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamaas447

3 Comments

Sorted by latest first Latest Oldest Best

 

@Angie530

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).

10% popularity Vote Up Vote Down


 

@Marchetta884

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.

10% popularity Vote Up Vote Down


 

@Mendez628

Have you tried using rel="canonical"? This link should help explain, www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139394.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme