Zone settings
On this page
Every setting a zone has is on its page in the NOC. Its settings are on six tabs: General, Hostnames, Origin, Caching, Security and Sentinel. A switch, a choice or a list saves the moment it is changed; the zone name, the origin and the blocked and always allowed addresses save with their own buttons, Save, Save origin and Save addresses. Every change reaches every location within about fifteen seconds and applies to requests from then on, whatever is already cached: the one thing a cached file keeps is its lifetime, fixed when it was stored, so a new Cache expiration time reaches files already in the cache only when they are next fetched, or when you purge. Maintenance mode, Origin shield, Blocking, Token authentication and CacheGenie Sentinel each have an article of their own, and so do full sites and tunnel zones.
Zone name#
Under General, the name you know the zone by in the NOC, the API and your invoices: 1 to 64 characters, kept as you type it, and not one another of your zones already has, whatever the case. Visitors never see it, and changing it changes nothing about what the zone serves. An invoice already issued keeps the name it was issued with.
Origin URL#
Where the zone fetches from: a scheme, a hostname or IP address, and a port if it is not the default, such as https://origin.example.com or http://203.0.113.10:8080. A path is optional: a file a viewer asks for as /videos/intro.mp4 is fetched from that path at the origin, and with https://origin.example.com/library/ from /library/videos/intro.mp4. No query string and no credentials, and an origin whose hostname is cachegenie.com or a name under it is refused. A private, loopback or link-local address is refused; a hostname that resolves to one saves, but the edge will not connect to it, so every request answers the 502 page. Changing the address changes where the next fetch goes; files already cached stay as they are, so purge the zone if the new origin holds different files under the same names. On a bucket origin the field is the Bucket endpoint, and on a full site the Web server address. A tunnel zone has none: it fetches from the Tunnel endpoint it names.
Host header#
The Host header sent to your origin. Empty, it is the hostname from the Origin URL, or the endpoint's host on a tunnel zone. Set it when your origin is reached by an address but serves by name, for example an IP origin that hosts several sites. It is not used while Forward host header is on, because that sends each visitor's own hostname instead; the field is read-only and keeps its value for when the switch goes off. A bucket origin never reads it: the Host header always stays the bucket's own, and a private bucket's signature covers it.
Origin certificate#
A certificate we make for this zone, for you to install on your origin server. With Verify origin SSL certificate on, our servers trust your origin when it presents it, whatever address, port or hostnames the zone uses, so an origin with no public certificate can still be verified. It is created, reissued and revoked on its own card on the Origin tab, below Connecting to your origin, needs an https:// origin or a tunnel zone, and does not expire: Origin certificates.
Cache expiration time#
How long the edge keeps a file before fetching it again. Respect Origin Cache-Control follows the Cache-Control and Expires headers your origin sends, and a set of defaults by file type when it sends none; How caching works has the exact order. A fixed time overrides max-age, s-maxage and Expires from the origin, and applies to playlists too, which under Respect Origin Cache-Control are otherwise held for 10 seconds at most. What no setting overrides: a response marked no-store or private, one that sets a cookie while Strip response cookies is off, one with a Vary header naming anything other than Accept-Encoding (an image that varies by Accept excepted: it is kept once per format), and any status other than 200 or 206 are never stored.
| Setting | Seconds (the API value) |
|---|---|
| Respect Origin Cache-Control | -1 |
| Do Not Cache | 0 |
| 3 Minutes | 180 |
| 20 Minutes | 1200 |
| 1 Hour | 3600 |
| 3 Hours | 10800 |
| 12 Hours | 43200 |
| 1 Day | 86400 |
| 3 Days | 259200 |
| 1 Week | 604800 |
| 1 Month | 2592000 |
| 3 Months | 7776000 |
| 1 Year | 31919000 |
Do Not Cache sends every request to your origin, at the cost of an origin fetch per request. The lifetime is fixed when a file is stored, and again when an expired copy is refreshed, so changing this setting does not shorten or lengthen the life of files already in the cache.
Query string#
How much of a link's query string, the part after the ?, makes a different cached copy. It has its own card on the Caching tab and saves the moment a position is chosen. All, the default, keeps each query string as a copy of its own. None ignores it, so /video.mp4?t=12 and /video.mp4 are one copy, fetched from your origin without the query string. Only these keeps the parameters you add to its list and ignores the rest; it saves once the list has a name in it. See Query strings.
Caching strategy#
How readily a location that does not hold a file yet fetches it from another of our locations that does, rather than from your Home PoP or origin. It has its own card on the Caching tab and saves the moment a position is chosen. Speed uses another location's copy only when it is clearly faster, by at least 20% and at least 10 ms. Balanced, the default for every zone, uses it unless it is much slower: at most 1.5 times as long, or at most 30 ms longer, whichever allows more. Origin savings always uses the nearest location holding a copy, however far away it is, so your origin is asked as little as possible. It is offered on every origin type, applies to cached files only, and traffic between our locations is free. See Caching strategy.
The switches#
| Switch | Starts | Not used on |
|---|---|---|
| Verify origin SSL certificate | Off | |
| Forward host header | Off | Buckets |
| Follow redirects | Off | Buckets, full sites, tunnels |
| Origin shield (Home PoP) | Off | Tunnels |
| Home PoP for dynamic requests | Off | Buckets, tunnels |
| Send Early Hints | Off | All but full sites |
| Strip response cookies | On | |
| Block root path access | Off | |
| Block POST requests | Off | |
| Add canonical headers | On | Buckets, full sites, tunnels |
| Add CORS headers | On |
A full site and a tunnel zone start with settings of their own, which their articles list. The first six are under Connecting to your origin on the Origin tab, Strip response cookies and the two Add switches under Response headers on the Caching tab, and the two Block switches under Request rules on the Security tab. A switch an origin type does not use is greyed with the reason beside it, and its saved value comes back if the origin type changes.
Verify origin SSL certificate
On, the edge connects to your origin over HTTPS only when it presents a certificate we trust: one a public authority issued for the name we are asking for, valid and unexpired, or the zone's origin certificate. Off, the connection is still encrypted but the certificate is not checked. An origin with no public certificate can have an origin certificate and keep this on. A certificate passes when it is valid for the host in the Origin URL, a hostname or an IP address, or for the name your origin is asked for: the hostname the visitor used while Forward host header is on, or the Host header field when it is set. So an origin reached by an IP address, or by a load balancer's own name, keeps this on with a certificate for your site's name or for its own address.
Forward host header
On, the Host header sent to your origin is the hostname the visitor asked for, and each hostname on the zone is cached separately, because an origin that is told the name can answer it differently. Off, the origin is told its own name (or the Host header above) and every hostname on the zone shares one copy of each file. Off is right for one folder of files under several names; on is right for an origin that answers each name differently.
Follow redirects
On, a redirect from your origin is followed at the edge, up to nine in a chain, and the file at the end is cached under the URL the viewer asked for; the viewer never sees the redirect. A longer chain, or a hop to a private address, answers the 502 page. Off, the redirect is passed to the viewer as it is, and it is never cached. A bucket never follows redirects: a signed bucket request followed to a new address would fail its signature. A full site and a tunnel zone never do either: their redirects belong to the visitor's browser.
Origin shield (Home PoP)
On (Auto Detect), the edge automatically chooses the location nearest your origin and every other location fetches this zone's files through it, after any other location's copy the Caching strategy allows, so your origin sees one location instead of all of them. Off, every location fetches from your origin directly. A tunnel zone has no such setting: the location its connector joins is its Home PoP. See Origin shield.
Home PoP for dynamic requests
On, the requests that are never cached, a POST, PUT, PATCH, DELETE or OPTIONS with its body and every WebSocket, go through the Home PoP as well, so your origin hears from one location for everything. It needs Origin shield (Home PoP) on, and is not used on a bucket or a tunnel zone. See Home PoP for dynamic requests.
Send Early Hints
On, while your web server is still building a page, the browser is told which stylesheets, scripts and fonts to start loading, in a 103 Early Hints answer taken from the preload and preconnect Link headers your pages send. Only a full site sends them, a tunnel zone in the Full website delivery included. See Early Hints.
Strip response cookies
On, every Set-Cookie header is removed from the zone's responses, and a Cookie a viewer sends is dropped before the request reaches your origin, so one visitor's session can never be cached and served to another. Off, a request that carries a cookie bypasses the cache and goes to your origin, and a response that sets a cookie is never stored.
Block root path access
On, a request for a directory rather than a file is answered 403: the root /, any path ending in /, and the dot forms /. and /.., for every method.
Block POST requests
On, a POST to the zone is answered 403 and never reaches your origin. Only POST: PUT, PATCH and DELETE are passed through as before. A bucket origin refuses every method but GET and HEAD anyway, with 405. It breaks every form, login and API call that posts through the zone.
Add canonical headers
On, every response carries Link: <https://origin.example.com/path>; rel="canonical", naming the file at your Origin URL, so a search engine that finds the file on a CDN hostname credits the original rather than indexing a duplicate. It replaces any Link header your origin sent. Switch it off if the CDN hostname is the address you want indexed. Not used on a bucket, whose endpoint is not an address anyone can reach, nor on a full site or a tunnel zone, whose server's own address is not one to name.
Add CORS headers
On, files whose extension is .eot, .ttf, .woff, .woff2 or .css are sent with Access-Control-Allow-Origin: *, Access-Control-Allow-Methods: GET, HEAD, OPTIONS and Access-Control-Max-Age: 86400, replacing those three headers if your origin sent them; any other Access-Control-* header your origin sends passes through. Every other file is sent the CORS headers your origin gives the visitor's own site, even from the cache (see CORS and the cache), so for video, JSON or images loaded across origins, set the rules at your origin or in your bucket.