Single purges

  Last updated May 17, 2021

Fastly provides several levels of cache purging. You can purge something as small as a single URL via the "Purge URL" command or as large as all content under a service via the "Purge All" command. You can also selectively purge content via key-based purging using the "Purge Key" command. We also provide a purging feature called Soft Purge that allows you to mark content as outdated (stale) instead of permanently deleting it from Fastly's caches.

Purging via the user interface

To purge content using the Fastly web interface, choose one of the purging methods below.

Purging a URL

To purge a single URL, follow the steps below:

  1. Log in to the Fastly web interface.
  2. From the All services page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. From the Purge menu, select Purge URL. The Purge URL window appears.

    a purge by url

  4. From the Domain menu, select the domain on which your content resides. If the domain you select is a wildcard domain (e.g., *.example.com) the Subdomain field will appear.
  5. If the Subdomain field appears, enter the subdomain to purge for the wildcard domain you've selected (e.g., www).
  6. In the Full URL path field, enter the path to the content you'll be purging (e.g., /example.jpg). The Preview field displays the URL that will be purged.
  7. Optionally select the Soft purge checkbox to mark your content as outdated instead of deleting it from cache.
  8. Click the Purge button.

Purging with keys

To purge content with surrogate keys, follow the steps below:

  1. Log in to the Fastly web interface.
  2. From the All services page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. From the Purge menu, select Purge key. The Purge key window appears.

    a purge by url

  4. In the Keys field, enter one or more surrogate keys. Use spaces to separate multiple keys.
  5. Optionally select the Soft purge checkbox to mark your content as outdated instead of deleting it from cache.
  6. Click the Purge button.

Purging all content

To instantly purge all content under your service, follow the steps below:

  1. Log in to the Fastly web interface.
  2. From the All services page, select the appropriate service. You can use the search box to search by ID, name, or domain.
  3. From the Purge menu, select Purge all. The Purge all window appears and displays the service name you'll be purging.

    a purge all

  4. In the field of the Purge all window, confirm you want to purge all cached content on a service by entering the exact name of the service that appears (e.g., An Example Service).
  5. Click the Purge button.

Purging via API

The syntax for purging a service through the API can be found in the Purging section of the API documentation.

When you purge using the API, the purge ID is returned in the response. For example:

1
{"status": "ok", "id": "1234567890"}

If the purge isn't working, send an email to support@fastly.com with the purge ID, the resource you're attempting to purge, and the type of purge (e.g., purge by surrogate key through the API).

Back to Top