How Google crawls URLs with query parameters
RFC 3986 defines the query component as starting at the first ? and ending at # or the end of the URI.
Google's guidance:
In a 2008 post, Google said it can crawl dynamic URLs and interpret their parameters.
The same post says a database-driven site does not have a significant indexing or ranking disadvantage.
Google recommends
=between a key and its value and&between parameters.Google says there is no limit on the number of parameters, but short URLs are a good rule of thumb.
Google names the main disadvantage: different dynamic URLs can show the same content.
The retired URL Parameters tool
Guides that tell you to configure parameters in Search Console are outdated. Google announced in March 2022 that it would retire the Search Console URL Parameters tool within one month. Google says its crawlers now learn automatically how to deal with URL parameters.
Session IDs, facets and the rewrite-to-static myth
Parameters that change nothing. Google recommends removing parameters that do not change the content.
Session IDs. Google recommends keeping session IDs out of URLs and using cookies instead.
Facets. Google says parameter-based faceted navigation can generate infinite URL spaces.
The rewrite-to-static myth
In a 2008 post, Google advised against reformatting a dynamic URL to make it look static. The fix for duplicate dynamic URLs is canonicalization. Some duplicate content on a site is normal and does not violate Google's spam policies.
The URL scheme comes from the framework and the CMS. For the framework side, see Next.js pre-rendering and data fetching.
For URL changes in a CMS move, see the headless CMS SEO migration guide.
Sources
- Dynamic URLs vs. static URLs (Google Search Central Blog, 2008)Google · developers.google.com
- RFC 3986: Uniform Resource Identifier (URI): Generic SyntaxIETF · rfc-editor.org
- URL structure best practices for Google SearchGoogle · developers.google.com
- Spring cleaning: the URL Parameters tool (Google Search Central Blog, 2022)Google · developers.google.com
- Managing crawling of faceted navigation URLsGoogle · developers.google.com
- What is URL CanonicalizationGoogle · developers.google.com