Full-Site Delivery

These articles describe how to use Fastly's CDN.


Caching

These articles describe configuration settings and changes you can make to your cache settings when setting up Fastly services.

To ensure optimum origin performance during times of increased demand or during scheduled downtime for your servers, consider the following…

Read more

Checking the cache status of an object on your website can help when troubleshooting problems. You can use the web interface or the curl…

Read more

When we store your content in cache, we calculate a Time to Live (TTL). The TTL is the maximum amount of time we will use the content to…

Read more

Application Programming Interfaces (APIs) allow you to retrieve data from a variety of web services. Fastly makes it possible for you to…

Read more

This guide explains how to implement API cache control. Once you've enabled API caching , and ensured purging works properly with your…

Read more

In certain situations you may want to conditionally apply a different caching policy based on a backend response. In this particular case…

Read more

Fastly service configurations may be vulnerable to cache poisoning if they do not take into consideration the interaction between HTTP "X…

Read more

Fastly’s Segmented Caching feature allows you to cache resources of any size. Segmented Caching works by breaking resources into smaller…

Read more

Caching can be disabled: at the individual URL level, at the browser level, and at the site level. Disabling caching at the individual URL…

Read more

Conditions

These articles describe conditions and how to use them in VCL and the Fastly web interface.

Conditions are a configuration mechanism that you can add to your service to control how particular requests are processed. Like conditions…

Read more

If you are having problems using conditions, here are some common things to look for. Check the Apply if field for if statements Most…

Read more

Conditions use the Varnish Configuration Language (VCL) to define when a configuration object should be applied while processing requests…

Read more

Custom VCL

These articles describe how to create your own VCL files with specialized configurations.

VCL Snippets are short blocks of VCL logic that can be included directly in your service configurations. They're ideal for adding small…

Read more

Basic authentication is a simple way of protecting a website at the edge. Users enter a username and password combination to access pages…

Read more

Fastly can send custom responses for certain requests that you don't want to hit your origin servers. Creating a quick response Fastly…

Read more

Best practices in Fastly VCL have changed over time to help address expectation gaps and improve maintainability. This page covers some of the most common use cases in edge logic and demonstrates how to avoid bad code, reduce risk, improve safety, and take steps to make the codebase more maintainable for large teams.

Read more

In normal operation, a request directed to a Fastly POP will be handled by two separate cache servers acting together in a process we call clustering.

Read more

VCL services offer an efficient mechanism to manage and control traffic to your domains, powered by Fastly's variant of the Varnish Configuration Language (VCL).

Read more

If a fatal error occurs in your service while processing your VCL logic, Fastly will generate an error response with a 503 HTTP status, instead of using a response from an upstream server or cache, and unless intercepted by code running in vcl_error, this generated error may be served to the end user.

Read more

Fastly VCL is a domain specific programming language which has evolved from the Varnish proxy cache, which is part of Fastly's platform architecture.

Read more

Fastly’s Edge Cloud services use the Fastly Varnish Configuration Language (VCL), a scripting language used to configure and add logic to…

Read more

Fastly supports the ability to extract header subfield values without regular expressions in a human-readable way. Headers subfields are…

Read more

Before you begin If your origin uses special values (e.g., request headers) to select content for users or to otherwise direct requests to…

Read more

The traditional way to read response cookies in VCL is to inspect either the beresp.http.Set-Cookie or the resp.http.Set-Cookie…

Read more

Being able to track information related to your origin can be helpful in troubleshooting errors and making sure requests are processed as…

Read more

Passing with a request setting and with a cache setting triggers very different behavior in Varnish . Within VCL, passing with a…

Read more

Fastly allows you create your own Varnish Configuration Language (VCL) files with specialized configurations. By uploading custom VCL files…

Read more

Dynamic VCL Snippets are one of two types of snippets that allow you to insert small sections of VCL logic into your service configuration…

Read more

Regular VCL Snippets are one of two types of snippets that allow you to insert small sections of VCL logic into your service configuration…

Read more

Fastly VCL uses a subset of Perl Compatible Regular Expression (PCRE) syntax. This is case sensitive and forward slashes don't need to be…

Read more

Dictionaries

These articles describe how to move rapid key/value pair decision logic to the edge using dictionaries.

Dictionaries are a type of container that allow you to store data as key-value pairs that can be used in a service without being attached…

Read more

Dictionaries are a type of container that allow you to store data as key-value pairs that can be used in a service without being attached…

Read more

Domains and origins

These articles describe configuration settings and changes you can make to your domains and origins when setting up Fastly services.

This guide describes how to automatically load balance between two or more origin servers. Load balancing distributes requests across…

Read more

Connection timeouts to your origin server control how long Fastly will wait for a response from your origin server before exiting with an…

Read more

Fastly allows you to change origin servers based on the user's geographic location. This is useful when you need to serve different content…

Read more

This guide describes how to configure failover origin servers. Failover (backup) servers ensure you can maintain availability of your…

Read more

Fastly has integrated IPv6 into its technology stack. By enabling IPv6, visitors on IPv6 connections can access your websites and…

Read more

It is common to use the same origin web application to serve both HTTP and HTTPS requests and let the application determine which actions to…

Read more

Sometimes you want to set up two different origin servers, one as a primary and one as a backup in case the primary becomes unavailable. You…

Read more

To rewrite the Host header being sent to your origin regardless of the Host used in the initial request, specify an override host. Use this…

Read more

Some customers use only their second-level or apex domain (e.g., example.com rather than www.example.com ) as their canonical domain. Due…

Read more

Headers

These articles describe configuration settings and changes you can make to your headers when setting up Fastly services.

HTTP header fields are components of the header section of request and response messages in the Hypertext Transfer Protocol (HTTP). They…

Read more

Enabling Cross-Origin Resource Sharing (CORS) allows a server to indicate that other origins can request sub-resources, like scripts and…

Read more

You can remove headers from any backend response. This may be necessary if your application automatically sets headers. For example, Drupal…

Read more

In some situations you may want to override the content type that a backend returns. To do that you will need to create a new header object…

Read more

Image optimization

These articles provide basic instructions for and examples of setting up and beginning to use the Fastly Image Optimizer.

Fastly's Image Optimizer (Fastly IO) is an image optimization service that manipulates and transforms your images in real time and caches…

Read more

Observability

These articles provide information about monitoring your services via the web interface.

When an observed metric either exceeds or falls below a threshold, the Alerts feature displays a notification in the Fastly application and…

Read more

From the Observability tab, you can access dashboards that contain collections of metrics represented as charts. Depending on the…

Read more

Performance

These articles describe how to adjust the performance of Fastly's services beyond standard configuration methods.

We think the mtr tool offers a great way to test network speed, evaluate performance, and perform connection diagnostics. The mtr tool…

Read more

Compression can help you reduce the size of your assets so traffic can flow faster. You can use Fastly to compress data automatically on our…

Read more

This guide describes how to enable HTTP/3 for your Fastly services. About HTTP/3 HTTP/3 uses a web transport protocol standard called QUIC…

Read more

If you haven't enabled Segmented Caching , you may encounter the following failure modes when working with large objects. If you created…

Read more

Fastly continuously monitors the performance and status of our global network . We constantly monitor the health of all its related…

Read more

HTTP/2 server push allows you to set up rules that enable Fastly to pre-emptively load and then send responses to an HTTP/2-compliant client…

Read more

Under normal circumstances, Fastly would consider these URLs different objects that are cached separately: http://example.com http://example…

Read more

Fastly can automatically detect and, in real time, route around transient connection problems that occur when fetching content from your…

Read more

Fastly can optionally serve stale content when there is a problem with your origin server or if new content is taking a long time to fetch…

Read more

When fetching an object from the origin, the Streaming Miss feature ensures the response is streamed back to the client immediately and is…

Read more

Purging

These articles describe how to purge cache.

Fastly's URL purge feature allows you to purge individual URLs on your website. By default, authentication is not required to purge a URL…

Read more

Fastly provides several levels of cache purging. You can use the Purge URL option to purge a single URL via the web interface. Before you…

Read more

Fastly provides several levels of cache purging. You can use the Purge all option to purge all content under a service. Before you begin…

Read more

Fastly provides several levels of cache purging and choosing the right purging method is essential to keeping your website fast. While…

Read more

Fastly provides a Soft Purge feature that allows you to mark content as outdated ( stale ). Stale objects remain available to use in some…

Read more

Surrogate keys are unique identifiers that you assign to groups of content for processing. While there are many use cases for surrogate keys…

Read more

Requests

These articles describe configuration settings and changes you can make to requests when working with Fastly services.

Using a restart is a good option to check multiple backends for a single request. This can be created using a cache setting rule and…

Read more

To conditionally change a URL based on the domain, include VCL that looks something like this: If you have shielding enabled, however, add…

Read more

Request settings are applied based on the Action you select in the Create a new request setting page. You can choose any one of the…

Read more

Responses

These articles describe configuration settings and changes you can make to your response settings when setting up Fastly services.

The robots.txt file tells web robots how to crawl webpages on your website. You can use Fastly's web interface to create and configure a…

Read more

The default error responses served by Fastly can be jarring for your users, especially when using Fastly for consumer applications. To…

Read more

You can use the Redirect traffic to www subdomains setting to redirect traffic for apex domains, wildcard domains, or subdomains to a www…

Read more

Fastly allows you to create custom HTTP responses that are served directly from the cache without storing the page on a server. Responses…

Read more

Video

These articles describe setup and configuration guidelines for setting up live stream delivery or video on-demand.

Fastly's On-the-Fly Packaging (OTFP) service supports any directory structure you might use to store different quality levels of a video…

Read more

Fastly allows you to collect and process On-the-Fly Packaging (OTFP) service metrics for analysis using a combination of custom VCL…

Read more

This page lists some possible error values that Fastly's On-The-Fly Packaging service (OTFP) service will send in the X-Fastly-Package…

Read more

The Fastly network can deliver live streams for any HTTP streaming technology , archived or recorded, on any public or private cloud…

Read more