When you enable parameter ignoring, CDN edge nodes remove query parameters (the part after the ?) from request URLs. This allows requests with different parameters to hit the same cached copy, improving the cache hit ratio. This topic describes how to configure parameter ignoring, compares it with alternative features, and provides usage suggestions.
Feature comparison
Custom Cache Key conflicts with parameter ignoring. If you configure both parameter ignoring and Custom Cache Key at the same time, parameter ignoring becomes invalid.
Custom Cache Key can replace parameter ignoring for cache key configuration and offers more comprehensive functionality. We recommend using it first. Configuration comparison:
Scenario
Parameter ignoring
Custom Cache Key
Ignore all request parameters in the cache key
Set Ignore Parameters to Yes and leave Retain Specified Parameters empty.
Add a request parameter handling rule:
Action: Retain
Parameter name: Set to any non-existent parameter name, such as example-argument.
Retain only request parameter key1 in the cache key
Set Ignore Parameters to Yes and set Retain Specified Parameters to
key1.Add a request parameter handling rule:
Action: Retain
Parameter name: key1
Delete only request parameter key1 from the cache key
Delete the parameter setting for
key1.Add a request parameter handling rule:
Action: Delete
Parameter name: key1
Rewrite Origin Parameters can replace parameter ignoring for origin request rewriting and offers more comprehensive functionality. We recommend using it first.
Feature overview
Ignore parameters
Function | Scenarios |
Removes query parameters (the part after | Enable parameter ignoring when URL parameters are unrelated to resource content (such as user UID, referral source, or promo codes). For example, these two requests access the same resource but carry different UIDs: User A: User B: Without parameter ignoring, CDN edge nodes treat these as different resources and cannot share the same cache, requiring an origin fetch for each request. With parameter ignoring enabled, CDN edge nodes strip the parameters and use |
URL signing takes precedence over parameter ignoring. Type A signing includes URL parameters in its signature. CDN performs authentication first and caches the replica only after successful validation.
Retain origin parameters
Function | Scenarios |
Retains all original URL parameters during origin fetches to ensure the origin server receives critical user information. | When parameter ignoring is enabled, CDN edge nodes use the parameter-stripped URL for origin fetches by default. In the example above, both User A and User B would trigger an origin request to |
Procedure
Log on to the CDN console.
In the navigation pane on the left, click Domain Names.
In the domain list, click the target domain name. In the navigation pane on the left, click Optimization to go to the performance optimization configuration page.
Click Modify in the Ignore Parameters section. Select a mode and complete the configuration based on your needs.
After completing the configuration, click OK to save.
Switching modes clears existing configurations.
After modifying the parameter ignoring configuration, cached files on edge nodes do not update automatically. You must perform a URL refresh or directory refresh in the console to apply the new configuration and purge old cache. Otherwise, users might still access content cached under the old policy, causing access issues.
Mode: Retain specified parameters
Parameter | Description | Example |
Ignore Parameters |
| Assume the original URL is
|
Retain Specified Parameters | Enter parameter names to retain. You can specify up to 10 parameters, separated by commas (,). | |
Retain Origin Parameters |
| |
Rule Condition | A rule condition identifies various parameter information in a user request. This determines whether a configuration takes effect for that request. Important When you reference rule conditions, they are matched based on the priority of the associated rule conditions, not the configuration order of the feature itself.
|
Mode: Delete specified parameters
Parameter | Description | Example |
Remove Specified Parameters | Enter parameter names to delete. You can specify up to 10 parameters, separated by spaces. | Assume the original URL is
|
Retain Origin Parameters |
| |
Rule Condition | A rule condition identifies various parameter information in a user request. This determines whether a configuration takes effect for that request. Important When you reference rule conditions, they are matched based on the priority of the associated rule conditions, not the configuration order of the feature itself.
|
Usage scenario examples
Using parameter ignoring to mitigate cache-bypass attacks via URL parameters
When attackers or crawlers add random meaningless parameters (such as ?timestamp=xxx or ?random=xxx) to request the same resource, CDN treats each parameterized request as a unique resource. This reduces cache hit ratio and spikes back-to-origin traffic.
Enable parameter ignoring (or configure it to ignore all parameters) so requests with different random parameters hit the same cache, effectively reducing origin pressure. For example, after enabling parameter ignoring, these requests hit the same cache:
http://example.com/page.html?t=123456http://example.com/page.html?t=789012http://example.com/page.html?random=abc
With parameter ignoring enabled, all these requests use http://example.com/page.html to match the cache, effectively mitigating cache-bypass attacks via URL parameters.