---
header: WebSockets
last_updated: '2025-12-16'
url: https://docs.fastly.com/products/websockets
---

Fastly supports the use of the [WebSocket protocol](https://datatracker.ietf.org/doc/html/rfc6455). This protocol allows you to establish long-lived, two-way, interactive communication sessions between an end user's client (such as a web browser) and your servers.

## Limitations and considerations

Keep in mind the following limitations and considerations:

- WebSockets is not compatible with [shielding](https://www.fastly.com/documentation/guides/getting-started/hosts/shielding) or the [Fastly Next-Gen WAF](https://docs.fastly.com/products/fastly-next-gen-waf).
- When [adding a host](https://www.fastly.com/documentation/guides/getting-started/hosts/working-with-hosts) to your Fastly service configuration, only the **Name**, **Address**, **Enable TLS**, and **Override Host** origin server settings are supported with WebSockets.
- When handling a WebSocket request, `vcl_log` will run at the time the request is accepted rather than when the connection ends.
- Client request headers that are added, removed, or modified on your `Request` (or `req.http` in VCL) will be reflected in the WebSocket handoff.
- If you have TLS certificates on your origin server, they must be signed by a public certification authority. Self-signed TLS certificates are not supported.

## Billing

> **NOTE:** Billing limits for this product may be different depending on your [account type](https://www.fastly.com/documentation/guides/account-info/billing/account-types/), if you've purchased a [packaged offering](https://www.fastly.com/package-entitlements/), or are using a [product or feature trial](https://www.fastly.com/documentation/guides/account-info/billing/about-the-products-page).

Use of the WebSocket protocol is disabled by default. Users assigned the superuser role in eligible accounts can enable it on the [Products](https://manage.fastly.com/products) page. Once enabled, any user on your account with the [appropriate permissions](https://www.fastly.com/documentation/guides/account-info/user-access-and-control/configuring-user-roles-and-permissions) will be able to use this communications protocol.

Enabling WebSockets on your account will also result in changes to your monthly bill. We base billing for WebSockets on a combination of bandwidth and connection time. Connection time is measured for each connection in usage minutes (rounded up to whole minutes) and aggregated monthly to millions of minutes. Bandwidth is included as part of your overall delivery bandwidth rate in your monthly billing statement. Consider setting a \[spend alert]\(https://www.fastly.com/documentation/guides/account-info/billing/about-the-spend-alert-page/) for your account to automatically be notified when your month-to-date bill approaches or meets a specific dollar amount.

> **NOTE:** Some Fastly products can be purchased directly in the web interface on the [Products page](https://www.fastly.com/documentation/guides/account-info/billing/managing-product-purchases-and-trials/) by an account Superuser or User Admin. Be sure to review all limitations, considerations, and [pricing information](https://www.fastly.com/pricing) before purchase. Alternatively, contact your customer success manager or email [sales@fastly.com](mailto:sales@fastly.com) for product purchase or pricing information.
