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
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.
Origin Pull Protocol
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).
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 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.
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.
Delete your content from the cache so that StackPath will retrieve it from the origin on next request. You can purge everything in your site, or you can choose to selectively purge by full URL or recursive path
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.
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.
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.
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
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
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)
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 certificate to cover a delivery domain you would like 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
Soon StackPath will be able to provide a free SSL certificate that covers your desired delivery domain. We will have more information when we release the feature.