Deutsch
URLs & domains

URL parameters

Also known as: query parameters, query string parameters

URL parameters are key and value pairs added to a URL after a question mark. They pass extra information to the server or the page, for example a sort order, a filter or a campaign tag. The part of the URL that holds them is the query string.

How are URL parameters written?

Google’s documentation recommends an equals sign (=) between key and value and an ampersand (&) between multiple parameters:

Text
https://example.com/category?category=dresses&sort=low-to-high

Special characters are percent-encoded, so a space becomes %20 (MDN).

Anatomy of a URLThe example URL https://shop.example.de/shoes/sneakers/?color=red&page=2#reviews broken into parts: scheme https, host shop.example.de with subdomain shop, domain example.de and top-level domain de, path /shoes/sneakers/ with a trailing slash, query string with two parameters color=red and page=2, fragment reviews. The fragment is not sent to the server.Trailing slashhttps://shop.example.de/shoes/sneakers/?color=red&page=2#reviewsSchemeHostPathQuery stringFragmentSubdomainDomainParameterParameterTLDcountry code: ccTLDstays in the browser, is notsent to the serverSchematic. Scheme, host, path, query and fragment are components defined in RFC 3986.Subdomain, domain and TLD split the host by DNS level. Without a port, https uses port 443.
A URL broken into its parts. RFC 3986 defines scheme, host, path, query and fragment. Only the browser evaluates the fragment after #, it is not sent to the server. Sources: RFC 3986: Uniform Resource Identifier (URI), Generic Syntax; MDN: What is a URL?; MDN Glossary: TLD.

Which jobs do URL parameters do?

Typical uses are filtering and sorting in shops, site search, pagination, language selection and campaign tracking such as UTM tags (Botify). Some change the content of the page, others do not.

What do URL parameters mean for SEO?

Each parameter combination is a new URL. Google notes that crawlers cannot tell whether faceted navigation URLs are useful without crawling them first, so they often access a very large number of such URLs before concluding they are not. That slows the discovery of new content.

If parameter URLs should not appear in search, Google lists these options: block the parameters in robots.txt, use fragments instead of parameters for filters, point filtered pages to the unfiltered version with rel="canonical", or mark links with rel="nofollow". If they should be indexed, use standard & separators, keep the order of filters consistent and return a 404 when a combination has no results.

Duplicate cluster and canonical URLFour URL variants of the same category page form a cluster: an HTTP version, a version without www, one with the tracking parameter gclid and one with a sort parameter. Google picks https://www.example.com/dresses/ as the canonical URL. Below are the signals in order of strength according to Google: redirect strong, rel="canonical" strong, sitemap weak.DUPLICATE CLUSTERCANONICAL URLhttp://www.example.com/dresses/protocol variant (HTTP)https://example.com/dresses/host variant (no www)https://www.example.com/dresses/?gclid=ABCDtracking parameterhttps://www.example.com/dresses/?sort=pricesort function (parameter)Google pickshttps://www.example.com/dresses/usually shown in resultsand crawled mostregularlyWHAT INFLUENCES THE CHOICE, BY STRENGTH ACCORDING TO GOOGLE1redirect to the preferred URLstrong2rel="canonical" (HTML link or HTTP header)strong3URL listed in the sitemapweakGoogle also prefers HTTPS over HTTP.Schematic. The preference is a hint. Google may choose a different URL as canonical.Several signals pointing to the same URL are stronger together.
Google groups identical or very similar pages into a cluster and picks one canonical URL. According to Google, redirects and rel="canonical" are strong signals and the sitemap is a weak one. Your own preference remains a hint. Sources: Google Search Central: What is URL canonicalization; Google Search Central: How to specify a canonical URL with rel="canonical" and other methods.
How three filters multiply one category into thousands of URLsOwn calculation example: the category /shoes has three filters with 8 colors, 12 sizes and 20 brands. With all three filters set there are 8 × 12 × 20 = 1,920 URLs. If filters may stay empty, it is 9 × 13 × 21 = 2,457, and with three sort orders 7,371. Google describes two paths: URLs meant for search keep a fixed filter order, no duplicate filters and a 404 for empty results; URLs not meant for search are blocked in robots.txt or keep filters in the URL fragment.Category1 page/shoesColor8 values?color=redSize12 values&size=9Brand20 values&brand=…1 URLcategory8 URLswith color96 URLs+ size1,920 URLsall three filtersOWN CALCULATION EXAMPLE8 × 12 × 20 = 1,920 URLs with all three filters setFilters may stay empty: 9 × 13 × 21 = 2,457 URLsPlus 3 sort orders (?sort=price …): 2,457 × 3 = 7,371 URLsEvery other parameter order adds yet another URL.Meant for searchfixed filter order,no duplicate filters,404 for empty resultsNot meant for searchdisallow in robots.txtor keep filters in theURL fragment (#color=red)
Own calculation example. Three filters are enough to turn one category into thousands of URLs. Google describes two approaches, depending on whether the filtered pages are meant for search. Sources: Google Crawling: Managing crawling of faceted navigation URLs; Google Crawling: Optimize your crawl budget.

Common mistakes

  • Filters that can be combined without limit. Google notes that crawlers often access a very large number of faceted navigation URLs before concluding they are not useful, which slows the discovery of new content.
  • Missing 404 for empty combinations. For parameter URLs that should be indexed, Google advises returning a 404 when a filter combination has no results.
  • Relying on the URL Parameters tool. Google deprecated the Search Console tool in 2022 and says its crawlers learn how to handle parameters on their own. robots.txt rules remain for more control.

Sources

  1. URL structure best practices for Google Search – Google Search Centraldevelopers.google.com
  2. Managing crawling of faceted navigation URLs – Google Search Centraldevelopers.google.com
  3. URL: search property – MDN Web Docsdeveloper.mozilla.org
  4. What are URL parameters? – Botify (secondary)botify.com
  5. Spring cleaning: the URL Parameters tool – Google Search Central Blogdevelopers.google.com

Last updated: