phpsessionsessionid

Session id in url


I made a site in php and when i visit it it shows a session id in the url.

http://example.com/wat_wij_verkopen.php?PHPSESSID=f4d91f171d85b4ccabbb8d06e29b7308

I dont know why or how, because google sees this a duplicate content in the SEO standaards.

Can someone please tell me what or how this is.


Solution

  • Thats to support browsers with deactivated cookies / without cookie support. PHP also supports session authentication via URL parameter (with session.use_only_cookies set to 0) instead of a cookie.

    To disable it set session.use_trans_sid to 0 with ini_set. You also might wanna set session.use_only_cookies to 1 to be sure PHPSESSID in URL won't be used at all.