URLs · Query strings

Query string contains session IDs

This page links to itself with a session ID in the query string, so every visit can create a brand new address for the same page.

How this page is built

The link below points to this page with ?PHPSESSID=8f14e45fceea167a5a36dedd4bea2543 added to its address. The server ignores the query string and returns this same page.

See this page with a session ID.

Session IDs are long random values, so every visitor, and every crawler visit, gets a different one.

The canonical on both versions points to this page's address without the query string.

Why it matters

Session IDs in URLs give each visitor their own copy of every address. Search engines see thousands of URLs for the same content and may index the wrong one.

Shared links can also expose another person’s session, which is a security risk.

How to check it

Search a crawl export for parameters such as PHPSESSID, JSESSIONID, sid and sessionid. If the number of URLs grows every time you crawl, session IDs are a likely cause.

How to fix it

Store sessions in cookies instead of URLs. Turn off URL-based sessions in the server or platform settings, and redirect old addresses with session IDs to the clean version.

Back to all tests