Public link

A public link points to a specific path in the repository. For example, if a file is located in the repository at /my/file, it will be available at

  • When you rename the file to "/my/file2" or move it, you will lose access to it using the old link, and the actual link will become "".
  • If another file named "/my/file" is loaded into the repository, the contents of the new file will be available at the link "".

Direct link

A direct link is a link pointing to a file, regardless of its location in the repository and its name.

If the file is saved under the path "/my/file", a direct link to it may look like "". If you rename it or move it to another folder, it will still be available at the link "".

Link signing

ZeroCDN provides the ability to restrict access to files by ip and by time or by cookie and time (only for public links). The following is to be done:

  • To restrict file access:
    • To set the "is_hidden" parameter for the file via the REST API;
    • or the "Available only by signed link" option in the file properties in the web interface.
  • To generate a signed link for the user.

Attention! The time is indicated in UTC+00:00.

Attention! You cannot use urlencoded file path to generate links.

Attention! To generate links to files with names containing non-Latin characters, the path to the file must be converted to utf-8 using the utf8_encode () function.

Attention! This restriction does not apply to authorized users who own the file. For them, the file is available both through an unsigned public link and through an incorrectly signed one.

Since supports two types of links, the mechanism for generating signatures is different for them.

Signing public link

The public link signature is generated based on:

  • file paths,
  • ip or cookie of the user to whom the link is issued (ip or cookie is optional, if they are absent, the value is not checked),
  • link expiration time (UTC + 00: 00 in YYYYMMDDHH format),
  • api-key (the api-key can be viewed and set in the settings in the web user interface).

Time & IP restriction

link [username][signature]:[deadline]/[path_to_file]
signaturemd5([path_to_file]-[ip]-[deadline]-[secret])md5('/my/file.mp4-') = 2c99cd801aebec2b63233323495722ae

Time and cookie limits

Allows you to generate a link associated with a specific user, regardless of his IP.

When generating a link, you need to set a unique cookie value, which will be checked on the CDN side.

The string of the format "[domain_name]-UID" is used as the name of the cookie-key.

Any value can be used as content: from the user id in the client system to a unique sequence of UID characters..

The cookie-key value is used instead of the IP when generating and validating the signature.

The lifetime of the cookie key must not be less than the lifetime of the link.

Cookie name[domain]-UID
signaturemd5([path_to_file]-[cookie-value]-[deadline]-[secret])md5('/my/file.mp4-c980d2b6-4ddb-4b35-8172-56ec427d2e75-1983122408-password') = 14ffa7bc046f16e3c6c1b2a5459ee918

Attention! This function works only if White Label is connected (delegation of a custom domain to CDN servers).

Time limit

signaturemd5([path_to_file]--[deadline]-[secret])md5('/my/file.mp4--1983122408-password') = 4df70de26df93014d8c13962c88dee9c

Restriction by catalog provides the ability to restrict access not only to a single file, but to all files in a specific directory at once. This feature can be used, for example, for HLS.

The directory restriction can be used in conjunction with the cookie or ip restriction.

signaturemd5([path]--[deadline]-[secret])md5('/video/--1983122408-password') = 4df70de26df93014d8c13962c88dee9c

Signing direct links

The signature is generated based on:

  • ip of the user to whom the link is issued (ip is optional, if it is absent, the user's address is not checked),
  • link expiration time (UTC + 00: 00 in YYYYMMDDHH format)
  • file id
  • file name
  • api-key (the api-key can be viewed and set in the settings in the web user interface)

Time & IP restriction

signaturemd5([id] - [name] - [ip] - [deadline] - [secret])md5('1-file.flv-') = 62f68600ae7372948abeffdfa6c7262a

Time limit

signaturemd5([id]-[name]--[deadline]-[secret])md5('1--file.flv-1983122408-password') = 15e4d52ec88756013bfa52541efda569