This guide describes how to use the Fastly TLS product to upload and deploy your own TLS certificates and private keys using the Fastly web interface.
To serve secure traffic from Fastly using HTTPS, a website or application needs to provide clients with a valid TLS certificate signed by a trusted Certification Authority (CA). TLS (Transport Level Security) and its predecessor SSL (Secure Sockets Layer) are the protocols that allow clients to form secure server connections so traffic can be served over HTTPS.
Fastly offers an API for uploading and managing your keys and certificates used to activate TLS for your domains on Fastly.
Before you begin
To use Fastly TLS with certificates and keys that you upload and deploy via the web interface, be sure you have the following prerequisites in place:
- a paid Fastly user account (not a developer’s trial) assigned the role of superuser or assigned a user role with added TLS management permission
- a valid X.509 TLS certificate from a trusted CA and a matching 2048-bit RSA private key
- permission to modify the DNS records on the relevant domains that appear as Subject Alternative Name (SAN) entries on the TLS certificate
- the relevant domains added to a properly configured Fastly service
The Fastly TLS web interface is compatible with certificates that have been uploaded as part of the Customer-Provided TLS Certificate Hosting Service with the following limitations:
- If you update previously uploaded certificates, you can continue to use the Customer-Provided TLS Certificate Hosting Service with no changes to your bill.
- Removing a previously uploaded certificate from the Customer-Provided TLS Certificate Hosting Service and uploading a new one using Fastly TLS will result in the new certificate being counted in your bill for Fastly TLS. The old certificate will continue to be billed per any contracted term for Customer-Provided TLS Certificate Hosting Service.
For information on migrating certificates from the Customer-Provided TLS Certificate Hosting Service to Fastly TLS, contact firstname.lastname@example.org.
In addition to these prerequisites, be sure you understand the following limitations:
- Uploaded certificates require clients to support TLS v1.2 and Server Name Indication (SNI) by default. To discuss how you can use settings other than these defaults, contact email@example.com. The ability to use custom settings may require you to use a dedicated Fastly IP address pool, which must be purchased separately.
- Fastly TLS does not support the Triple DES (3des) cipher suite.
- If you're a DigiCert customer, be aware that upon making certificate changes, DigiCert will revoke your original certificate 72 hours after re-issuance. Be sure you upload your new certificate and switch all hostnames as soon as possible.
Uploading a private key and certificate
To upload a TLS certificate and the relevant private key (used to initially generate the certificate) follow the steps below.
The key file upload tool currently only accepts 2048-bit RSA keys. If you require longer key lengths, contact firstname.lastname@example.org.
- Log in to the Fastly web interface and click the Secure link. The Secure page appears displaying an overview of Fastly's security offerings.
- Click the Manage certificates button. The TLS domains page appears displaying any domains for which TLS has been or can be activated. If you've not yet started setting up TLS on any of your domains, this page appears empty.
- Click the Secure another domain button. The Enter domain window appears.
- Click the I want to bring my own certificate and private key link. The TLS certificates tab appears displaying the secure upload controls.
Drag and drop your private key file into the drag and drop area to upload your private key file. Alternately, click the Browse for key file link to navigate to the file on your system using the file picker.
The private key appears below the upload controls and displays the Unmatched key label prominently on the left.TIP
Unmatched keys are private keys that have no matching TLS certificate. If you have multiple private keys, you can identify each by the unique SHA1 hash. Private keys can only be deleted if they are in the unmatched state.
- Upload a TLS certificate using the same drag-and-drop area or file picker you used to upload your private key. A success message appears.
Activating TLS on a domain
Once a valid certificate and private key have been uploaded, all domains that appear as SAN entries will be listed on the TLS domains page with a status of TLS ready. To serve HTTPS traffic using your certificate, follow the steps below to activate TLS for the domain and point the DNS records to the certificate's location.
- Click the TLS domains tab. The list of all domains that appear as SAN entries appear. Domains in a disabled state will have the status of
Ready to activate.
- Find the card for the domain where you want to activate TLS.
Click the Activate this certificate button to the right of the certificate you want to activate. The DNS details appears.
Fastly deploys your TLS certificate to the entire Fastly edge network. It may take up to an hour for your certificate to become available throughout the world.
Use the DNS details displayed in this section to configure your DNS records so that a TLS connection can be established using your certificate.
It can take up to 48 hours for new DNS records to propagate across the internet.
Applying a TLS configuration to a domain
TLS configurations are a collection of TLS settings that include the supported versions of TLS and HTTP, along with networking and handshaking options that clients will use. For accounts with more than one TLS configuration, the default configuration has a label in the right corner of the card.
TLS configuration names are editable by clicking the pencil icon next to the name.
To override the default TLS configuration applied to a domain or to migrate a domain to use a different configuration follow these steps.
- Click the TLS domains tab.
- Find the card for the domain where you want to change the configuration.
- Click the View/Edit Activations button next to the certificate you want to modify. A list of TLS configurations appears.
Click Activate next to the configuration you want to activate.NOTE
While you may have multiple certificates on a given domain, only one certificate can be active for a given TLS configuration. If the TLS configuration is already in use by another certificate, a Switch to this certificate button appears.
Once the configuration is selected, the TLS configuration is applied to the domain. Each TLS configuration is active and available at their respective IP addresses and DNS records.
- Click See DNS details and use the information to configure your DNS records so that a TLS connection can be established using your certificate.
- Confirm the new DNS records have propagated across the internet (this can take up to 48 hours), then delete the old TLS configuration by clicking the trash can icon.
For HTTP/1.1, be sure to activate TLS for each of your domains in the web interface. If you upload a certificate with multiple SANs, each domain must have TLS explicitly activated if you want to secure these domains on Fastly.
Exceptions may apply in the case of HTTP/2 if your browser coalesces secure connections and has previously received a TLS certificate from an earlier handshake. In this case, some browsers may reuse an existing secure connection to Fastly if its certificate has a matching SAN entry.
Updating a certificate
The TLS certificates page warns you when a certificate is nearing its expiration date:
or when a certificate is past its expiration date:
There may be situations where Fastly identifies certificates that should be updated and replaced. These certificates will be clearly marked with a recommendation:
Fastly allows you update a certificate by replacing it with a new one at any time.
Updating certificates when there are no removed domains
To update a TLS certificate by replacing it with one that contains all the domains as the original (either as a superset or a matching list) follow these steps.
- Generate a new certificate with your preferred Certification Authority.
- If a new key was generated with the new certificate, click the Upload a new key or certificate button to upload it.
- Find the certificate you’re replacing on the TLS certificates tab in the web interface.
Click the word Update in the upper right corner of the certificate’s card.
- Using the file picker that appears, find the new certificate you’re replacing the old one with. The certificate you select should be PEM-formatted and the SAN entries of this new certificate must contain all entries in the current certificate (i.e., it must either have an exact matching list or contain a superset).
Wait for the certificate update process to complete. A success message appears indicating the certificate has been successfully updated.
All domains actively serving TLS traffic on the old certificate will be automatically transitioned to the updated certificate within a matter of minutes. Any new domains will need to be manually activated by following the steps for activating TLS on a domain.
Updating certificates when there have been changes to domains
If you want to update one of your certificates that requires removing domains, you will need to procure a new certificate with the updated list of SAN entries. Follow the steps to upload this certificate as a new certificate.
- Upload the new certificate.
- Click the TLS domains tab and find the previously existing domains that have already been activated with the certificate you’re replacing.
- Click View/Edit Activations next to the appropriate certificate on the domain card to see the active TLS configurations.
From the list of configurations that appear, click the Switch to this certificate button next to the configuration you want to apply.
- Click Done.
- Delete the old certificate.
- Manually activate any new domains that have been added to the updated certificate by following the steps for activating TLS on a domain. Certificates for newly activated domains can take between 5 minutes to an hour to fully deploy across Fastly’s global network. If the new certificate is not being used to serve TLS traffic within 1 hour, contact email@example.com for assistance.
Certificate display names are editable by clicking the pencil icon next to the name.
Deactivating TLS and deleting certificates and private keys
Once a domain has TLS activated, you have the option to deactivate TLS via the Deactivate TLS button listed on the TLS domains page. If a domain has multiple certificates, you can elect to deactivate a specific certificate by clicking Add/Edit Activations and clicking the Deactivate button next to any active configurations. If all certificates are deactivated, Fastly will no longer serve TLS traffic on the selected domain and it will become disabled.
To delete a certificate from the TLS certificates page, be sure to disable TLS for all domains on that specific certificate. You will also need to delete all certificates before you can delete a matching private key.
Thirty days before any certificate is due to expire, the web interface will display warnings on certificates soon to expire. Fastly will also begin to periodically send automated expiration notification emails to all superusers. If the certificate is not replaced or removed, Fastly will continue to email users on the account until the certificate expires. Once expired, Fastly will no longer send automatic notifications.