What’s the Best Way to Manage Session IDs within my PHP dynamic URLs?
What's the Best Way to Manage Session IDs within my PHP dynamic URLs?
- Most of my webpages are constructed with PHP in order to use the Shopping.com API. This results in the addition of ?pid=38089342 identifiers to the end of all my URLs. How do I stop the ?pid= from displaying? I understand it can result in possible duplicate content issues with the search engines.
Answer: Those ?pid= appendages to your URLs are called session IDs (pronounced: eye dees). They're used to uniquely identify and track each visitor to your site.
Session IDs can create a problem with search engine indexability, since spiders prefer not to index pages that have session IDs in the URL. Session IDs are notorious for trapping a search engine spider in a loop (they call it a spider trap) where the same page gets served to the spider over and over—each time with a different session ID.
This happens because the session ID is trying to track the spider as a unique visitor. So each time a search engine downloads the page, it sees a different session ID tagged onto that page's URL. This can confuse the search engine into thinking that it's a different page, rather than the same page with a URL based on the different session ID number.