After you enable the parameter filtering feature, Alibaba Cloud Content Delivery Network (CDN) can delete parameters that follow the question mark (?) from request URLs. This improves the cache hit ratio, reduces the number of requests that are redirected to the origin server, reduces the amount of network traffic generated during the back-to-origin process, and accelerates content delivery. When you enable the parameter filtering feature, you can specify the parameters that you want Alibaba Cloud CDN to delete.

How it works

The parameter filtering feature can delete all or specified parameters from request URLs, and retain all or specified parameters in request URLs. The following figure shows how parameter filtering works.
Note The URL signing feature has a higher priority than the parameter filtering feature because signing type A authenticates parameters in HTTP requests. Therefore, Alibaba Cloud CDN authenticates URL parameters before it deletes or retains the parameters. Alibaba Cloud CDN performs parameter filtering only after the request passes the authentication. The parameter filtering feature does not affect the URL signing feature. The requested resources are cached on CDN nodes based on the hash keys that are generated by parameter filtering. For more information about URL signing, see URL signing.
Delete parameters
Feature Description
Parameter Filtering

After you enable Parameter Filtering, Alibaba Cloud CDN deletes the parameters that follow the question mark (?) from request URLs. This increases the cache hit ratio.

For example, the first time http://www.****.com/1.jpg is visited, the requested resource is not cached on CDN nodes. Therefore, Alibaba Cloud CDN must retrieve the requested resource from the origin server. When http://www.****.com/1.jpg?test1 is visited, the URL parameters that follow the question mark (?) are deleted because parameter filtering is enabled. The request can directly hit the cached resource of http://www.****.com/1.jpg.

Parameter Filtering+Delete Parameters After you enable Parameter Filtering and specify the parameters that you want to delete, the specified parameters that follow the question mark (?) are deleted. Other parameters are retained.
Retain Origin Parameters
  • If you enable Retain Origin Parameters, Alibaba Cloud CDN retains all parameters that follow the question mark (?) in request URLs during the back-to-origin process.
  • If you do not enable Retain Origin Parameters, Alibaba Cloud CDN deletes the specified parameters from request URLs during the back-to-origin process.

Procedure

  1. Log on to the Alibaba Cloud CDN console.
  2. In the left-side navigation pane, click Domain Names.
  3. On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column of the domain name.
  4. In the management pane of the domain name, click Optimization.
  5. In the Parameter Filtering (Delete Specified Parameters) section, click Modify.
  6. Set the following parameters based on the instructions.
    Parameter filtering
    Parameter Description
    Parameter Filtering Turn on Parameter Filtering.
    Delete Parameters Specify the parameters that you want to delete based on your business requirements.

    You can specify up to 10 parameters to be deleted. Separate multiple parameters with commas (,). For example, for the URL http://www.abc.com/a.jpg?x, set Delete Parameters to x.

    Retain Origin Parameters Turn on or turn off Retain Origin Parameters based on your business requirements.
    • If you enable Retain Origin Parameters, Alibaba Cloud CDN retains all parameters that follow the question mark (?) in request URLs during the back-to-origin process.
    • If you do not enable Retain Origin Parameters, Alibaba Cloud CDN deletes the specified parameters from request URLs during the back-to-origin process.
  7. Click OK.

Related API operations

BatchSetCdnDomainConfig