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