All Products
Search
Document Center

ApsaraVideo VOD:Parameter filtering

Last Updated:Jan 27, 2026

When you enable parameter filtering, Alibaba Cloud CDN points of presence (POPs) remove parameters that follow the question mark (?) in a request URL. These parameters can include information such as user identities and access channels. CDN then uses the resulting URL to generate a cache hash key. This process improves the cache hit ratio and accelerates content delivery. This topic describes how to configure parameter filtering.

Overview

Note

The URL signing feature has a higher priority over the parameter filtering feature. The signature information that is generated by signing type A contains the parameters in an HTTP request. Alibaba Cloud CDN verifies the signature information before the CDN points of presence (POPs) cache a copy of the requested resource. For more information about how to configure URL signing, see Configure URL signing.

  • Ignore parameters

    Description

    Scenario

    Alibaba Cloud CDN removes the parameters that follow the question mark (?) in request URLs so that requests that are destined for the same file but carry different URL parameters can hit the cache. Parameter filtering increases the cache hit ratio, reduces the origin fetch frequency, and accelerates file distribution.

    Some users append parameters after the question mark (?) in request URLs to pass information, such as the user ID (UID), request source, and recommendation code, to the origin server. In this case, these URLs carry different query strings even if the requests are destined for the same file.

    We recommend that you enable parameter filtering if the parameters that follow the question mark (?) in URLs are irrelevant to the requested resource. Examples:

    • Request from User A: http://example.com/1.jpg?uid=123***

    • Request from User B: http://example.com/1.jpg?uid=654***

    If the POP uses the original URLs from User A and User B, the requests cannot hit the same file in the cache. The requests must be redirected to the origin server.

    After you enable parameter filtering, the POP removes the UIDs that follow the question mark (?) in the request URLs. The final URL http://example.com/1.jpg is used to match the cache.

  • Retain parameters in back-to-origin requests

    Description

    Scenario

    The original URLs are redirected to the origin server so that key user information can be passed to the origin server.

    If you enable parameter filtering, POPs redirect the URLs that are processed by the parameter filtering feature to the origin server. In the preceding examples, the requests from User A and User B both use the URL http://example.com/1.jpg. The UIDs are not passed to the origin server during origin fetch.

    If you retain parameters in back-to-origin requests, POPs redirect the original URLs to the origin server so that the UIDs are passed to the origin server.

The parameter filtering feature can retain or remove specified parameters. The following figure shows the process of parameter filtering:

image

The following table lists examples of settings and their resulting origin URLs:

Parameter settings

Cache key

Origin URL

Ignore Parameters: Yes
No Retain Specified Parameters
Retain Parameters when Back to Origin: No

http://example.com/1.jpg

http://example.com/1.jpg

Ignore Parameters: Yes
Retain Specified Parameters: key1
Retain Parameters when Back to Origin: No

http://example.com/1.jpg?key1=1

http://example.com/1.jpg?key1=1

Ignore Parameters: Yes
No Retain Specified Parameters
Retain Parameters when Back to Origin: Yes

http://example.com/1.jpg

http://example.com/1.jpg?key1=1&key2=2&key3=3

Ignore Parameters: Yes
Retain Specified Parameters: key1
Retain Parameters when Back to Origin: Yes

http://example.com/1.jpg?key1=1

http://example.com/1.jpg?key1=1&key2=2&key3=3

Remove Specified Parameters: key1
Retain Parameters when Back to Origin: No

http://example.com/1.jpg?key2=2&key3=3

http://example.com/1.jpg?key2=2&key3=3

Remove Specified Parameters: key1
Retain Parameters when Back to Origin: Yes

http://example.com/1.jpg?key2=2&key3=3

http://example.com/1.jpg?key1=1&key2=2&key3=3

Procedure

  1. Log on to the ApsaraVideo VOD console.

  2. In the left-side navigation pane, choose Configuration Management > CDN Configuration > Domain Names.

  3. On the Domain Names page, find the domain name that you want to manage and click Configure in the Actions column.

  4. In the navigation pane on the left, click Performance Optimization.

  5. In the Ignore Parameters section, click Modify.

  6. Configure the required configuration items, such as the filtering pattern and filtering parameters.

    The following table describes the parameters.

    Important

    Switching the filter pattern deletes the current configuration.

    • Filter Pattern: Retain Specified Parameters

      Parameter

      Description

      Example

      Ignore Parameters

      • Yes: Enables parameter filtering. For origin fetch requests, parameters that follow the question mark (?) in the URL are removed.

        Note

        If you turn on Ignore Parameters but leave Retain specified parameters empty, all parameters that follow the question mark (?) are removed.

      • No: Disables the ignore parameters feature.

      Assume that the original URL is http://example.com/1.jpg?key1=1&key2=2&key3=3. The following examples show how CDN processes the URL based on different configurations:

      • Example 1: Filter all parameters + Use the processed URL for origin fetch:

        • Configuration: Set Ignore Parameters to Yes, leave Retain specified parameters empty, and set Retain back-to-origin parameters to No.

        • Cache key: http://example.com/1.jpg

        • Origin fetch URL: http://example.com/1.jpg

      • Example 2: Retain specified parameters + Use the processed URL for origin fetch:

        • Configuration: Set Ignore Parameters to Yes, set Retain specified parameters to key1, and set Retain origin parameters to No.

        • Cache key: http://example.com/1.jpg?key1=1

        • Origin fetch URL: http://example.com/1.jpg?key1=1

      • Example 3: Filter all parameters + Use the original URL for origin fetch:

        • Configuration: Set Ignore Parameters to Yes, leave Retain specified parameters empty, and set Retain back-to-origin parameters to Yes.

        • Cache key: http://example.com/1.jpg

        • Origin fetch URL: http://example.com/1.jpg?key1=1&key2=2&key3=3

      • Example 4: Retain specified parameters + Use the original URL for origin fetch:

        • Configuration: Set Ignore Parameters to Yes, set Retain specified parameters to key1, and set Retain origin parameters to Yes.

        • Cache key: http://example.com/1.jpg?key1=1

        • Origin fetch URL: http://example.com/1.jpg?key1=1&key2=2&key3=3

      Retain Specified Parameters

      Specify the parameters to retain. You can specify up to 10 parameters. Separate multiple parameters with commas (,).

      Retain Origin Parameters

      • Yes: Retains all parameters from the original request URL in the back-to-origin request.

      • No: The parameters in the back-to-origin request are the same as the parameters in the cache hash key. This means only the specified parameters are retained.

    • Filter Pattern: Delete Specified Parameters

      Parameter

      Description

      Example

      Delete specified parameters

      Specify the parameters to delete. You can specify up to 10 parameters. Separate multiple parameters with spaces.

      Assume that the original URL is http://example.com/1.jpg?key1=1&key2=2&key3=3. The following examples show how CDN processes the URL based on different configurations:

      • Example 1: Delete specified parameters + Use the processed URL for origin fetch:

        • Configuration: Set Delete specified parameters to key1 and set Retain origin parameters to No.

        • Cache key: http://example.com/1.jpg?key2=2&key3=3

        • Origin fetch URL: http://example.com/1.jpg?key2=2&key3=3

      • Example 2: Delete specified parameters + Use the original URL for origin fetch:

        • Configuration: Set Delete specified parameters to key1 and set Retain origin parameters to Yes.

        • Cache key: http://example.com/1.jpg?key2=2&key3=3

        • Origin fetch URL: http://example.com/1.jpg?key1=1&key2=2&key3=3

      Retain Origin Parameters

      • Yes: Retains all parameters from the original request URL in the back-to-origin request.

      • No: The parameters in the back-to-origin request are the same as the parameters in the cache hash key. This means the specified parameters are deleted.

  7. Click OK.