Define CDN settings

Introduction

The CDN settings can be used to adjust basic parameters of the CDN resource.


This help center article requires an active CDN resource



Browser cache TTL

The browser cache TTL (Time-To-Live) is used to define how long CDN responses should be stored in the browser cache. Modern browsers also check here whether the server-side response has been changed and, if necessary, compare it with the local cache.


Tip: To obtain an optimal rating in Google PageSpeed Insights, you should set the highest possible value. Google recommends a TTL of at least one year (365 days).


You can also find more information on the optimal cache time in the Google PageSpeed documentation.


Attention: Changes to the TTL always relate to static resources of caching type MISS or STALE. Existing resources that are already delivered by the CDN (HIT) are not affected by the change.



CDN cache TTL

The CDN cache TTL can be used to control how often a static file should be synchronized with the target server. If you frequently replace content under the identical URL, a short TTL should be selected here.


Attention: Selecting a very short TTL can lead to a very high number of HTTP requests against your target server. Only select a short TTL if you frequently exchange content under the identical URL.



HTTPS forwarding

If this setting is activated, all HTTP requests are redirected to HTTPS using a 301 code.



Avif support

If this setting is activated, all JPG and JPEG files are also converted to AVIF. If the requesting browser supports the Avif format, the newly generated Avif file is delivered instead of the original image file.


The check as to whether the browser supports the Avif format is controlled via the HTTP-Accept header.



WebP support

If this setting is activated, all JPG, JPEG and PNG files are also converted to WebP. If the requesting browser supports the WebP format, the newly generated WebP file is delivered instead of the original image file.


The check as to whether the browser supports the WebP format is controlled via the HTTP-Accept header.



Ignore query strings

If this setting is activated, all HTTP parameters starting with "?" are ignored. This setting is particularly useful for tracking URLs.



CORS Origin Header

If this setting is activated, all HTTP responses are extended by an "Access-Control-Allow-Origin:" header. The header is automatically aligned to the target server. E.g.: "Access-Control-Allow-Origin: https://deineseite.de". The static files that are already in the cache are not affected by this.


Further information on Cross-Origin Resource Sharing (CORS) can be found in the official Mozzilla documentation.



Canonical Header

By activating the Canonical Header setting, a "Link" header is added to all HTTP responses. The header is automatically aligned to the target server to prevent duplicated content.



Root document behavior

The Root document behavior setting regulates the behavior when accessing the root directory of the CDN domain. You can choose between the settings Allow access and Deny access.


With the Allow access setting, the incoming request is forwarded transparently to the defined target server. The CDN HTTP response contains a canonical header with the target server definition to avoid duplicated content.


With the setting Refuse access, incoming HTTP requests are immediately answered with a 403 error.



HTTP authentication

If the target server is protected with HTTP basic authentication, the access data for the target server can be entered here. The HTTP Authorization header is then transmitted to the target server in every request.