There are many ways to customize your content delivery. From instantaneous cache purge to query string control, you can customize TTLs and more to configure the delivery of your content across the CDN for a fully optimized experience. This article will explain how each setting works.
How to access CDN Configuration Settings
- Log into the StackPath Control Portal
- Select CDN from the left-side navigation
- Select edit next to the site you would like to update
If you're not using StackPath as a DNS provider you'll need to either set the DNS records for your delivery domains as CNAME types with this value or input this value into your CMS caching plugin. This URL supports both HTTP and HTTPS delivery. Please note that Dynamic content is not cached when the StackPath WAF is enabled. To learn more about the CDN URL please view a more detailed description here.
Delete your content from the cache so that StackPath will retrieve it from the origin on the next request. You can purge everything in your site, or you can choose to selectively purge by full URL or recursive path
The protocol, domain, and path that we will use to retrieve content from your origin server, this field usually contains the IP address of your server to ensure we have a direct connection.
In the event an origin server experiences failure, a backup origin can be entered. For more information about how backup origins work, please view our article here.
The Host Header is a request header our system sends to your origin server. By default, this is set to dynamic, but if your server is expecting a specific custom header, you can add that value to your Delivery Domains section, and select it from the drop-down for Host Header.
This setting will determine the protocol with which the CDN connects to your origin server. You can choose between HTTP Only, HTTPS Only, or HTTP or HTTPS (if your origin supports both protocols).
Cache Handling Settings
Set the maximum length of time that the CDN will cache your content before going back to the origin, or defer to the value passed by your origin.
- Origin Controlled
- The StackPath CDN will honor the cache-control headers.
- Specify CDN TTL
- Static content will be cached (and will not expire) based on the TTL configurated.
- Dynamic Content will be cached based on the origin cache control headers.
- Never Expire
- Static Content will be cached and will not expire.
- Do Not Cache
- Static and Dynamic resources will not be cached, and a request will be sent to the origin server for each request.
Query String Control
Determine how you want StackPath to treat URLs that have a query string portion (a "?" followed by a series of keyword/value pairs represented by "&x=y". Ignoring the query string means we will cache https://example.com/file.txt?ver=1 and https://example.com/file.txt?ver=2 identically based on which is requested first. "Standard" behavior is that we will cache these 2 URLs distinctly
Enable this to reduce the file size of your text-type content, which will improve delivery speeds. You can select a level from 1 (least compressed) to 6 (most compressed) if you're concerned about the CPU impact of decompression for your end users. For more information about how the StackPath CDN works with gzip, please view this article.
Enable this to keep content in cache beyond its expiration time in case we can't reach your origin. We'll check the origin, and if the file is there, we'll update it. If not we'll serve the expired asset from cache.
Vary is an HTTP response header that allows distinct variations of the same content to be cached using the same URL. The content is selected based on the value of the specified Request header, to ensure the right content is served to the right place.
When enabled the
vary header option allows the StackPath CDN to follow your origin server's
vary header when making origin pull requests. When Disabled, the CDN will ignore the header when making origin pull requests.
Client Browser Policy Settings
Browser Cache TTL
Set the length of time that client browsers use to locally cache your content, or defer to the value passed by your origin
CORS Header Support
Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell a browser to let a web application running at one origin (domain) have permission to access selected resources from a server at a different origin.
Enabling this feature will send an "Access-Control-Allow-Origin: *" header in the response which will indicate to the client browser which client origins will be allowed to access a resource.
HTTP/2 is the next generation of web protocol. It has features like binary encoding and multiplexing that make web connections faster and more efficient if your site is designed to make use of them.
Please note that StackPath HTTP/2 support does not include Push, and is only used on the connection between the client and the edge. Using HTTP/2 to the origin would in most cases have small to nonexistent performance benefits. HTTP2 is only available for encrypted requests (HTTPS)
This is the list of domains for which StackPath will use this site configuration to respond to requests. Add a delivery domain for every domain you wish to use this configuration.
Free Edge SSL Certificate
This box exists to inform you about our free SSL coverage included for the CDN URL, and serves another point from which you can copy and paste the URL for any needs.
Upload Custom SSL Certificate
This option allows you to upload your own SSL certificate to cover the delivery domain you would like to use for your CDN Site. You will have the option to upload the separate files that make up a certificate or to paste in the content of your certificate directly.
Request Free SSL Certificate
StackPath now offers Free SSL certificates to protect your primary delivery domain. For more information about how these work, please view this article about how the StackPath Free SSL certificate works.