Overview
The default settings applied to each new Site enable immediate and efficient delivery of content. You can edit these settings -- the most common options are exposed to you in the simple mode of editing a Site. More advanced options are available in advanced mode.
This guide will explain each of these settings in further detail.
Site Details
All of a Site’s details are visible at the top of the Edit Site page for quick reference of CNAME target, whether SSL and HTTP/2 are enabled, and delivery method.
You can edit a few attributes of a Site's details after clicking edit-pencil the edit button. You can edit a Site's name, change Delivery Method, and enable/disable SSL and HTTP/2. If you need help setting up a CNAME target, your CNAME target is made visible and links to setting up CNAME targets are provided.
Origin
Origin refers to your “origin server." It's where the CDN pulls your files and content from. The Origin field should be filled with the domain name or IP address of your origin server.
In most cases, whatever your Origin was set to when the Site was created is what you should use.
You can change the Origin from the default to whatever you’d like. Check out our Origin setup recommendations to learn about some of the ways available to you for setting up your Origin.
Whether you're setting up a full site or static content delivery Site will determine what kind of Origin you should configure. The Creating a Site article discusses the differences between the two.
Custom Domains
The different domains used to access your website or content are managed here. You can serve content off any domain or sub-domain you choose, as long as you properly point each domain to the CNAME/ANAME Target via your DNS manager.
Custom Domains are optional because you can deliver content right from your Site’s CNAME Target.
To learn more about creating CNAME/ANAME records, and how to properly point each to the CNAME/ANAME Target, head over to the CNAME records management, or ANAME records management help articles.
Like with configuring your Origin, whether you're setting up a full site or static content delivery Site will determine how you're required to configure your Custom Domains and the manage your DNS records.
Cache
Cache settings control how your content is pulled, cached, expired, purged, and refreshed in the CDN cache. All these settings affect the performance of your content on the web, including how much bandwidth you use, and what the requirements of your Origin are. So, make sure you fully understand each of the options before you make any changes to these settings.
Cache Expiration
There are four Cache Expiration Methods:
- Origin Controlled - indicates that the Cache-Control headers on content from your Origin will determine expiration.
- Relative to Ingest - indicates that the time which the content was pulled from the Origin (ingest time) plus the CDN TTL (see below) will determine expiration.
- Relative to Last Modified - indicates CDN TTL will be used to check the Origin for modified assets, and if assets have been modified the CDN will pull and cache them.
- Never Expire - indicates content in cache will remain in cache eternally.
CDN TTL
CDN TTL (Time to Live) is the expiration time used for content pulled from your Origin by the CDN. It's applied to all content being cached, and once the TTL expires, that content is purged from cache and replaced with fresh content from your Origin.
If Cache Expiration Method is set to Origin Controlled and a file is missing the Cache-Control header, CDN TTL will be, by default, applied to that file as the length of time to keep that file in cache. Additionally, a CDN TTL of “0” indicates the asset should remain in cache for as long as possible.
Browser TTL
Browser TTL is the expiration time used to control how long content can be cached by the end-user’s browser independent of how long it can be cached on the CDN. Browser TTL is not required.
To learn more about these settings, please see Cache Settings.
Compression
Compression is a good way to save on bandwidth and speed up your website. It enables the automatic compression of content before delivery to end-users.
All modern web browsers support this kind of compression -- also known as gzip compression -- and it’s a good idea to have it enabled for text based website files. It’s also a good idea to indicate which file types you want compressed by extension and mime-type both to ensure compression.
Cross Origin Resource Sharing (CORS)
The Allow All Origins option under CORS enables the sharing on content between two separate domains.
Enabling CORS here is useful if resources from your domain (such as JavaScript) are required to interact with resources from a different domain.
Custom MIME Types
The Custom MIME Types setting allows you to instruct the CDN to interpret file extensions into MIME types for web browsers that rely on MIME type extensions to define display behavior. Custom MIME Types become relevant if your Origin is unable to explicitly set the MIME Type.
MIME Type is used to identify the format of a file so that a browser can render or open the file correctly. MIME stands for Multipurpose Internet Mail Extension.
For example, you can tell the CDN if it see the “.jpg” extension, to automatically map that extension to the “image/jpg” MIME type.
Turning On Advanced Mode
You're entering developer territory. Publishing any changes in Advanced mode permanently prevents further changes from being made in simple editing mode. Be sure to explore Advanced mode and review all relevant documentation before proceeding to publish any changes.
For many websites and applications, working with the default configurations applied to a Site after creation should suffice. However, if you need to fine tune the way the CDN handles your content, advanced editing mode allows you to take advantage of just about every configuration available on the CDN.