Last update:2026-07-14 11:08:51
Compared with access control methods such as IP, Referer, Cookie, and User-Agent blacklists or whitelists, URL authentication provides a more advanced content protection mechanism. This method allows authentication information, such as timestamps and encrypted strings, to be embedded in the content URL. When users request content from the CDN, they must include the required authentication parameters. The CDN then verifies this information and determines whether to allow or deny access, effectively preventing unauthorized use of content URLs.
A typical URL authentication workflow involves three main components: the content management server, the user, and the CDN edge server.
For example, if the URL that requires authentication is http://example.com/test.jpg, the process is as follows:
http://example.com/test.jpg?token=123, and returns it to the user.Select the range of requests to which URL authentication applies:
| Setting | Description |
|---|---|
| All Requests | The access control rule applies to all request types. |
| Only Homepage | Applies only to the root directory of the domain, such as http://domain/ or https://domain/. |
| Specified File Type | Applies only to specific file types. You can select predefined file types or define custom file types. Separate multiple custom types with a semicolon ;, for example, jpg;png. |
| Specified URI | Applies only to requests for content at a specific URI. Two URI matching options are available: Exact matching: Matches the complete URI, including query parameters, for example, path/index.html?abc=123.Ignore parameter matching: Matches the URI without query parameters, for example, path/index.html. |
| Specified Directory | Applies to requests under specific directories. For example, /file/abc/ applies to all content under http://domain/file/abc/*.Note: Directory paths must start and end with / and can contain only letters, numbers, and certain special characters (underscore, hyphen, percent sign, and period). Separate multiple directories with line breaks. |
| URL Pattern | Uses regular expressions to define the range of requests to which the rule applies. For example, the pattern .*\.jpg$ ensures that access control applies to all URLs ending with .jpg. |
You can choose from five authentication modes available in the Atomile Console. Each mode is designed for different requirements and scenarios:
Because URL authentication settings can be complex, we recommend deploying the configuration to a test environment first to avoid affecting your production environment. After verifying that the configuration works as expected, you can apply it to the live environment. For detailed instructions on deploying configurations to a test environment, refer to Verify Configurations Through Pre-Deployment.
In addition, you can use the URL Authentication Generator
available in the Atomile Console to automatically generate URL authentication parameters for testing and verify whether the authentication parameters can be successfully validated by the CDN edge server. For more information about this tool, see URL Authentication Generator.