Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/content/docs/argo-smart-routing/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@

## Billing

If Cloudflare mitigates attacks on your site - whether through DDoS protection, the WAF, or other mechanisms - that traffic will not be included in any charges for Argo Smart Routing.
Argo Smart Routing is a usage-based service. You are charged based on the amount of data transferred (both upload and download bandwidth) between Cloudflare and your visitors for each domain where Argo is turned on.

Key billing details:

- **Usage-based billing cycle**: Each invoice reflects the previous billing period's usage. For example, your September invoice includes charges for Argo usage in August.

Check warning on line 47 in src/content/docs/argo-smart-routing/get-started.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-month

Potential month found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

Check warning on line 47 in src/content/docs/argo-smart-routing/get-started.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-month

Potential month found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)
- **Monitor your usage**: To avoid unexpected charges, set up [usage-based billing notifications](/billing/usage-based-billing/#usage-based-billing-notifications). When turned on, you receive a notification at the billing email address on file when traffic exceeds your configured threshold.

You can review your current Argo usage in the Cloudflare dashboard under **Billing** > **Billable usage**.

<Render file="ubb-recommendation" product="fundamentals" />

Expand Down
6 changes: 6 additions & 0 deletions src/content/docs/cache/concepts/cache-responses.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@ The resource was expired but served from Cloudflare's cache while the origin upd
## DYNAMIC

Cloudflare does not consider the asset eligible to cache and your Cloudflare settings do not explicitly instruct Cloudflare to cache the asset. Instead, the asset was requested from the origin web server. Use [Cache Rules](/cache/how-to/cache-rules/) to implement custom caching options.

---

## Troubleshooting cache behavior

Use the `CF-Cache-Status` header to understand cache behavior for a request. For common troubleshooting steps, refer to [Common cache issues](/cache/troubleshooting/common-cache-issues/).
62 changes: 62 additions & 0 deletions src/content/docs/cache/troubleshooting/common-cache-issues.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
pcx_content_type: troubleshooting
title: Common cache issues
description: Fix common Cloudflare cache issues.
sidebar:
order: 2
---

This page covers common cache issues related to session management and cache configuration.

## Session or login issues after enabling Cloudflare

Cloudflare does not store or manage session state for your application. Session information — typically stored in cookies — is proxied between the visitor and your origin server without modification by default. However, certain Cloudflare features can interfere with session persistence if your application is not configured to account for them.

### Cached responses strip cookies

By default, Cloudflare only caches [specific static file extensions](/cache/concepts/default-cache-behavior/#default-cached-file-extensions) such as images, stylesheets, and JavaScript files. These file types do not normally carry session cookies, so default caching does not affect sessions.

However, if you use a [Cache Rule](/cache/how-to/cache-rules/) to cache additional content types (for example, HTML pages), Cloudflare may serve those responses from cache without the original `Set-Cookie` headers from your origin. This can break session-dependent pages.

**To resolve this:**

- Do not cache URLs that set or require cookies for session management. Use a Cache Rule with a [bypass condition based on cookie presence](/cache/how-to/cache-rules/examples/bypass-cache-on-cookie/) to exclude authenticated or session-dependent pages.
- Confirm that your origin application does not require cookies on any URL that Cloudflare is caching. Review the `CF-Cache-Status` header to determine which URLs are being served from cache.

### IP-based session persistence breaks behind a reverse proxy

Some applications use the visitor's IP address as part of session tracking. Because Cloudflare operates as a reverse proxy, your origin server sees Cloudflare IP addresses instead of the visitor's real IP. If your application ties sessions to the client IP, sessions may break or rotate unexpectedly.

**To resolve this:**

- Configure your origin to read the visitor's real IP from the [`CF-Connecting-IP`](/fundamentals/reference/http-headers/#cf-connecting-ip) or `X-Forwarded-For` request header instead of the TCP source address.
- Refer to [Restoring visitor IPs](/support/troubleshooting/restoring-visitor-ips/) for server-specific configuration guides (Apache, Nginx, IIS, and others).
- If possible, switch your application to cookie-based session tracking instead of IP-based tracking.

### Workers or Transform Rules modify headers

If you have [Cloudflare Workers](/workers/), [Transform Rules](/rules/transform/), or legacy Page Rules active, they can modify request or response headers — including `Set-Cookie` and `Cookie` headers. Review these configurations if sessions break after adding or changing rules.

## Verifying whether Cloudflare is caching a URL

To check whether a specific URL is being cached:

1. Make a request to the URL and inspect the response headers for [`CF-Cache-Status`](/cache/concepts/cache-responses/).
2. If the header is absent, the response may not have passed through Cloudflare's cache layer. Common causes include the DNS record not being set to **Proxied** (orange cloud), a Worker returning a response before the cache phase, or a WAF/redirect rule acting on the request. Verify your DNS proxy status first.
3. If the header value is `DYNAMIC`, Cloudflare does not consider the URL cacheable by default. You can create a [Cache Rule](/cache/how-to/cache-rules/) to cache it.
4. If the header value is `HIT`, the response was served from Cloudflare's cache.

## Stale or incorrect content served from cache

If you see outdated content being served:

1. [Purge the cache](/cache/how-to/purge-cache/) for the affected URL or your entire zone.
2. After purging, make a new request and verify the `CF-Cache-Status` header shows `MISS` (indicating a fresh fetch from origin).
3. If the issue persists after purging, the problem may be at your origin server. [Temporarily pause Cloudflare](/fundamentals/manage-domains/pause-cloudflare/) to test the origin response directly.
4. If the origin response is also incorrect, the issue is in your application or server configuration, not Cloudflare's cache.

If you need additional help with a caching issue, include:

- The affected URL.
- The `CF-Cache-Status` and `CF-Ray` header values from the response.
- A [HAR file](/support/troubleshooting/general-troubleshooting/gathering-information-for-troubleshooting-sites/) captured while reproducing the issue.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Using Cloudflare's Services

Cloudflare launched in 2010 believing everyone deserves a secure, fast, reliable web presence. We did not think you should have to pay more when you came under cyber attack, so we offered free and fixed-rate pricing for websites. That worked because most websites do not consume much bandwidth, and so we could provide our services in an affordable way to everyone. From the beginning, we prohibited streaming video content using our bandwidth. While you could embed a video from another provider, we limited your ability to use our services to deliver video bits from our network to your visitors. This restriction exists because every second of a typical video requires as much bandwidth as loading a full web page.

Check warning on line 10 in src/content/docs/fundamentals/reference/policies-compliances/delivering-videos-with-cloudflare.mdx

View workflow job for this annotation

GitHub Actions / Semgrep

semgrep.style-guide-potential-date-year

Potential year found. Documentation should strive to represent universal truth, not something time-bound. (add [skip style guide checks] to commit message to skip)

Over time we recognized that some of our customers wanted to stream video using our network. To accommodate them, we developed our [Stream](https://www.cloudflare.com/products/cloudflare-stream/) product. Stream delivers great performance at an affordable rate charged based on how much load you place on our network.

Expand All @@ -19,43 +19,59 @@

## I'm a website operator and my content was redirected for Terms of Service violations

If you are on a Free, Pro, or Business Plan and your application appears to be serving videos or a disproportionate amount of large files without using the appropriate paid service as described below, Cloudflare may redirect your content or take other actions to protect quality of service. When this happens, you will receive an email notification regarding Cloudflare's actions and your options.
If you are on a Free, Pro, or Business Plan and your application appears to be serving videos or many large files without using the appropriate paid service as described below, Cloudflare may redirect your content or take other actions to protect quality of service. When this happens, you will receive an email notification regarding Cloudflare's actions and your options.

## Options for web admins to remove redirects

* **Serve redirected content from a grey-clouded sub-domain**

* **Serve redirected content from a paid service as outlined below**

## Delivering videos with Cloudflare using paid products
## Delivering videos and large files with Cloudflare using paid products

Cloudflare permits the delivery of video content with specific paid services. If you are interested in serving video content, there are two recommended options.
Cloudflare permits the delivery of video content and large files with specific paid services. If your application serves videos or many large files, use one of the following options.

### Option 1: Cloudflare Stream

[Stream](https://www.cloudflare.com/products/cloudflare-stream/) is a video-on-demand platform for building video applications. Stream encodes, stores, and delivers optimized video formatted for different devices and network connections.

To get started with Stream, visit **Stream** from your Dashboard or [sign up](https://dash.cloudflare.com/sign-up/stream). Your Stream videos are not attached to a domain in your Cloudflare account, and you do not need a domain on Cloudflare to use Stream.

### Option 2: Stream Delivery (Enterprise only)
For more information, refer to the [Stream documentation](/stream/).

[Stream Delivery](https://www.cloudflare.com/products/stream-delivery/) offers caching and delivery of video content through Cloudflare data centers around the globe. This CDN feature is only available on the Cloudflare Enterprise Plan. Please [contact sales](https://www.cloudflare.com/products/stream-delivery/#) if you'd like to explore this option.
### Option 2: Cloudflare R2

[R2](/r2/) is an S3-compatible object storage service with zero egress fees. R2 is well suited for storing and serving large files such as media assets, backups, software downloads, and datasets.

R2 does not charge egress for data accessed directly from R2 (Workers API, S3 API, `r2.dev` domains). If you place other Cloudflare services in front of R2 — for example, serving through a [custom domain](/r2/buckets/public-buckets/#custom-domains) — those services may have separate usage-based charges depending on your plan. You can use [Cache Rules](/cache/how-to/cache-rules/) to control caching behavior.

To get started, refer to the [R2 documentation](/r2/).

### Option 3: Cloudflare Images

[Images](/images/) stores, resizes, optimizes, and delivers images. If your site serves a large number of images and you want to reduce bandwidth while improving load times, Images handles format conversion, responsive sizing, and delivery automatically.

To get started, refer to the [Images documentation](/images/).

### Option 4: Stream Delivery (Enterprise only)

[Stream Delivery](https://www.cloudflare.com/products/stream-delivery/) offers caching and delivery of video content through Cloudflare data centers. This CDN feature is only available on the Cloudflare Enterprise Plan. [Contact sales](https://www.cloudflare.com/products/stream-delivery/#) to explore this option.

***

## Getting information on the content you are delivering

If you need more information about the content your zone is serving (for example, content type), you can use the following tools:

* Cache Analytics users: Open the **Caching tab** on the Dashboard to filter by content type and identify the type of traffic you are transferring.
* Users without Cache Analytics: Open the **Analytics tab** on the Dashboard and select the **Performance** section for information about the content you are serving.
* **Cache Analytics**: In the Cloudflare dashboard, go to **Caching** > **Cache Analytics** to filter by content type and identify the type of traffic you are transferring.
* **Zone Analytics**: In the Cloudflare dashboard, go to **Analytics & Logs** > **Traffic** and review the **Performance** section for information about the content you are serving.

![Cache Analytics - Identify type of traffic being transferred](~/assets/images/support/traffic-types.png)

## Still have questions? Contact support

If you have additional questions about redirection (e.g. if you believe your content was redirected in error and have supporting evidence), file a [support ticket](https://dash.cloudflare.com/redirect?account=support) and include the following information:
If you have additional questions about redirection (for example, if you believe your content was redirected in error and have supporting evidence), file a [support ticket](https://dash.cloudflare.com/redirect?account=support) and include the following information:

* Name of your domain
* Description of the problem
* Description of the content you're serving through Cloudflare's network
* Description of the content you are serving through Cloudflare's network
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,37 @@ Load balancing **requests** are the number of uncached requests made by your l

***

## I'm seeing a specific error code for my load balancer or monitor.
## I am seeing a specific error code for my load balancer or monitor.

For a list of specific error codes and next steps, refer to [Load Balancing Troubleshooting](/load-balancing/troubleshooting).
For a list of specific error codes and next steps, refer to [Common error codes](/load-balancing/troubleshooting/common-error-codes/).

***

## How do I troubleshoot a load balancing issue?

When you experience unexpected load balancing behavior — such as traffic routing to the wrong pool, endpoints marked unhealthy, or intermittent failures — work through the following checks:

1. **Identify the affected resources**: Note the specific load balancer, pool, and endpoint (origin) names experiencing the issue.
2. **Capture error details**: Record the exact error messages or unexpected behaviors you observe, including screenshots if applicable.
3. **Record timestamps**: Note when the issue occurred, in UTC.
4. **Review your current configuration**: Use the API to retrieve your load balancer and pool configuration:

```bash
curl "https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/load_balancers" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json"
```

```bash
curl "https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/load_balancers/pools" \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json"
```

5. **Check health monitor results**: Review monitor status in the dashboard under **Traffic** > **Load Balancing** to see which endpoints are reported as healthy or unhealthy.
6. **Review common causes**: Refer to [Common error codes](/load-balancing/troubleshooting/common-error-codes/) for explanations of specific error codes and their resolutions.

If the issue persists and you need additional help, include the affected resources, timestamps, error details, and current configuration when you open a support case.

***

Expand All @@ -103,3 +131,4 @@ For a list of specific error codes and next steps, refer to [Load Balancing Trou
* [Endpoint and pool health](/load-balancing/understand-basics/health-details)
* [Monitors](/load-balancing/monitors)
* [Load Balancing Analytics](/load-balancing/reference/load-balancing-analytics/)
* [Common error codes](/load-balancing/troubleshooting/common-error-codes/)
47 changes: 47 additions & 0 deletions src/content/docs/speed/observatory/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,50 @@ If you wish to disable RUM, follow these steps:

2. Select **Manage Site** for the hostname for which you wish to disable RUM.
3. Select **Delete**.

## Why does my Time to First Byte (TTFB) appear higher with Cloudflare enabled?

Because Cloudflare operates as a [reverse proxy](/fundamentals/concepts/how-cloudflare-works/), every request for an uncached resource travels through an additional network hop:

1. Cloudflare negotiates a connection with your origin server.
2. Cloudflare sends the request over that connection.
3. Your origin generates and returns a response.
4. Cloudflare receives the response and forwards it to the visitor.

For **uncached** resources, this extra hop can add a small amount of latency — typically only a few milliseconds. Visitors located closer to your origin server than to the nearest Cloudflare data center may occasionally see slightly longer TTFB values. In many cases, Cloudflare's network still reduces overall latency by serving cached content closer to visitors and optimizing the path to your origin.

For **cached** resources, TTFB is almost always faster because the response is served directly from the Cloudflare data center nearest the visitor, without contacting your origin at all.

:::note
Each Cloudflare data center maintains its own cache. The first request for a cacheable resource in a given data center must reach your origin before the response can be stored locally. Subsequent requests from that data center are served from cache and are significantly faster.
:::

To learn more about how TTFB is measured and why it may not reflect real-world user experience, refer to [Are you measuring what matters? A fresh look at Time To First Byte](https://blog.cloudflare.com/ttfb-is-not-what-it-used-to-be/).

### Recommendations to reduce TTFB

- Turn on [Argo Smart Routing](/argo-smart-routing/) (**paid add-on**) to optimize the network path between Cloudflare and your origin.
- Review the [Speed features](/speed/) available on your plan, including auto-minification and Early Hints.
- Increase your [cache hit ratio](/cache/performance-review/cache-performance/) so more requests are served from Cloudflare without contacting your origin.
- Use [Tiered Cache](/cache/how-to/tiered-cache/) to reduce the number of data centers that need to reach your origin.

For a detailed architecture overview, refer to the [Distributed Web Performance Architecture](/reference-architecture/diagrams/content-delivery/distributed-web-performance-architecture/) reference architecture.

## How do I troubleshoot slow website performance?

Start by running a speed test in Observatory to establish a baseline:

1. In the Cloudflare dashboard, go to **Speed** > **Synthetic monitoring**.

<DashButton url="/?to=/:account/:zone/speed/test" />

2. Enter the URL you want to test and select **Run test**.
3. Review the results. For help interpreting the metrics, refer to [Test results](/speed/observatory/test-results/).

When requesting further help from Cloudflare Support, include the following information:

- The tool or service you used to measure performance (for example, a Lighthouse report URL or WebPageTest result link).
- Example URLs that are affected.
- Ray IDs from the `cf-ray` response header captured during the test.
- Timestamps of when you observed the issue, in UTC.
- Which performance metric you want to optimize (for example, Largest Contentful Paint, Time to First Byte, or overall page load time).
Loading