All Products
Search
Document Center

ApsaraVideo VOD:Parameter filtering

Last Updated:Sep 15, 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.

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 ?) from request URLs so that requests with different parameters hit the same cache file. This improves the cache hit ratio and reduces back-to-origin traffic.

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: http://example.com/1.jpg?uid=123***

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

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 http://example.com/1.jpg to match the cache.

Note

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 http://example.com/1.jpg, losing critical information like UID. Enabling Retain Origin Parameters ensures CDN uses the original URL for origin fetches, preserving parameters like UID for the origin server.

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.