All Products
Search
Document Center

Edge Security Acceleration:Configure URL signing

Last Updated:Jun 10, 2026

Content distributed by DCDN is publicly accessible by default. URL signing validates an encrypted string and timestamp in each request URL to prevent unauthorized access and hotlinking of your origin resources.

How URL signing works

DCDN POPs collaborate with your origin server to validate requests. The process involves three components:

  • Origin application server: Generates a signed URL based on the signing algorithm and key, then returns it to the client.

  • Client: Sends the signed URL to a DCDN POP to request the resource.

  • DCDN POP: Validates the information in the signed URL, such as the cryptographic string and timestamp.

image

  1. You configure signing rules (algorithm and ) on the origin application server.

    For example, a signed URL can be in the format of http://DomainName/timestamp/md5hash/FileName.

  2. When a client requests a page, the origin application server generates a signed URL and includes it in the response (Steps 2 and 3).

  3. The client sends the signed URL to a DCDN POP (Step 4).

  4. The DCDN POP validates the cryptographic string and timestamp in the signed URL.

    • If authentication fails, the request is denied.

    • If authentication succeeds, the POP serves the content.

      Note
      • If a resource is not cached on a DCDN POP, the DCDN POP strips the authentication parameters from the URL to restore the original URL (for example, http://DomainName/FileName) before generating a cache key or fetching from the origin.

      • After DCDN authenticates your request URL, it encodes special characters in the URL, such as Chinese or other non-ASCII characters.

Configure and enable URL signing

Important
  • Before you begin, ensure that you have configured signing rules (algorithm and key) on your origin application server.

  • The URL signing logic configured in DCDN must match the logic on your application server.

  1. Log on to the DCDN 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 Configure.

  4. In the left-side navigation tree of the domain name, click Access Control.

  5. Click the URL Signing tab.

  6. Turn on the URL Authentication Setting switch.

  7. In the URL Signing dialog box, configure the URL signing parameters.

    URL signing

    Parameter

    Description

    Authentication Type

    Select the authentication type that matches your origin server's signed URL format.

    Note

    If URL signing fails, a 403 error is returned:

    • MD5 calculation error

      Example: X-Tengine-Error:denied by req auth: invalid md5hash=de7bfdc915ced05e17380a149bd760be

    • Time-related error

      Example: X-Tengine-Error:denied by req auth: expired timestamp=1439469547

    Primary Key

    Enter the primary key. Must be 6 to 128 alphanumeric characters.

    Secondary Key

    Enter the secondary key. Must be 6 to 128 alphanumeric characters. At least one key is required.

    Validity period

    A signed URL remains valid from timestamp to timestamp + validity period. Requests outside this window are rejected.

    • Unit: seconds

    • Value range: 1 to 31,536,000

    • Default value: 1800 (30 minutes)

    • Example: A signed URL with timestamp 2020-08-15 15:00:00 (UTC+8) and a 1800-second validity period expires at 2020-08-15 15:30:00 (UTC+8).

  8. Click OK.

Verify the signed URL

After you enable URL signing, generate a test URL in the DCDN console to verify your signing logic.

  1. In the Generate Encrypted URL for Testing section, specify the Original URL and authentication information.

    Generate signed URL

    Parameter

    Description

    Original URL

    Enter the original URL. Example: https://www.aliyun.com.

    Authentication Type

    Select the authentication type you configured in Configure and enable URL signing.

    Authentication Key

    Enter the Primary Key or Secondary Key from Configure and enable URL signing.

    Validity Period

    Enter the validity period in seconds. Must match the value in Configure and enable URL signing.

  2. Click Generate to get the Authentication URL and Timestamp.

    URL signing

Disable URL signing

Important

If you disable URL signing in DCDN but client requests still include signing parameters, DCDN cannot restore request URLs to their original format. All requests then miss the cache and are forwarded to the origin, causing a sharp increase in origin traffic and costs. To stop using URL signing, disable the feature on both your application server and in the console.

image
  1. In the DCDN console, navigate to the URL Authentication Setting section and turn off the URL signing switch.

  2. On your origin server, remove the logic that adds authentication parameters to URLs.

Related APIs