In short. Use a route configuration override with a selective query string caching behavior and a comma-separated parameter list.
Definition: Azure Front Door's query string caching behavior controls which request parameters contribute to a cache key. In a Standard or Premium rule set, a Route configuration override can use Ignore specified query string and list parameter names to exclude, or Include specified query string and list parameter names to retain.
Key facts
- The Route configuration override action can replace the caching configuration for a request. If the route configuration is overridden, caching must be configured or caching is disabled for that request, according to Microsoft's rule set actions reference.
- Ignore specified query string excludes the names entered in the parameters field from cache-key generation. Include specified query string uses those names in cache-key generation.
- The Query parameters field contains query string parameter names separated by commas, and it is used with the two selective behaviors.
- Microsoft's caching documentation shows a key changing from
/foo/image/asset.html?language=EN&userid=100&sessionid=200to/foo/image/asset.html?language=EN&sessionid=200whenuseridis excluded. - The Front Door route API reference exposes
queryParametersas a string and listsIgnoreSpecifiedQueryStringsandIncludeSpecifiedQueryStringsamong the supported behaviors.
How do the selective modes work?
The route configuration override action applies caching settings to requests that match a rule. Its Query string caching behavior field has four documented choices: Ignore Query String, Use query string, Ignore specified query string, and Include specified query string. The first ignores every query string when the cache key is generated. The second gives each unique URL its own cache key. The two selective choices use the names in Query parameters.
For an ignore list, choose IgnoreSpecifiedQueryStrings and enter the parameter names as a comma-separated value. For an allow list, choose IncludeSpecifiedQueryStrings and enter the names that should affect the key. Microsoft's JSON example shows the structure for the include mode:
{
"name": "RouteConfigurationOverride",
"parameters": {
"cacheConfiguration": {
"queryStringCachingBehavior": "IncludeSpecifiedQueryStrings",
"queryParameters": "customerId",
"isCompressionEnabled": "Enabled",
"cacheBehavior": "HonorOrigin",
"cacheDuration": null
},
"originGroupOverride": null,
"typeName": "DeliveryRuleRouteConfigurationOverrideActionParameters"
}
}
The same field names apply when the selected behavior is IgnoreSpecifiedQueryStrings; the behavior value changes and queryParameters holds the names to exclude. The reference describes the list as query string parameter names separated by commas.
What does the rule override?
The action can override the origin group or the route's caching configuration. When caching is enabled in the action, the configuration also controls whether Front Door honors the origin response, overrides the cache duration, or uses a duration when the origin provides no TTL. These settings are separate from the choice of names used to generate the cache key.
Microsoft's caching page states that Rules Engine caching configuration always overrides route configuration. It also documents that the route can be configured for query string behavior, while a rule action can apply a different caching configuration to matching requests. A route API cache configuration contains queryStringCachingBehavior and queryParameters, with the latter described as parameters to include or exclude.
How can you check the result?
The caching documentation says that the access log includes the cache status for each request and that reports include information about how Front Door's cache is used in an application. Review those records for requests handled by the matching rule. The documented cache-key example shows the expected form when one parameter is excluded, while the other query string pair remains in the key.
Related terms
- Cache-Control
- Why can an Azure Front Door origin override disable caching?
- How can Azure Front Door preserve the rest of a path during a rewrite?
FAQ
Can Azure Front Door ignore every query string?
Yes. The Ignore Query String behavior excludes query strings from cache-key generation. For selected names, use Ignore specified query string and provide the names in Query parameters.
What is the difference between Ignore specified and Include specified?
Ignore specified removes the listed names from cache-key generation. Include specified uses the listed names for caching.
Does a rule action take precedence over the route setting?
Yes. Microsoft's caching documentation states that Rules Engine caching configuration always overrides the route configuration. The route configuration override reference also says that caching must be configured when the route configuration is overridden.
Sources
- Microsoft Learn, "Rule set actions - Azure Front Door", 19 July 2024
- Microsoft Learn, "Caching - Azure Front Door", 15 July 2026
- Microsoft Learn, "Routes - List By Endpoint - REST API (Azure Front Door Service)", 17 April 2025
Check how a page reads to answer engines. Open the GEO score analyzer