
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Fri, 03 Apr 2026 17:12:00 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Slashing agent token costs by 98% with RFC 9457-compliant error responses]]></title>
            <link>https://blog.cloudflare.com/rfc-9457-agent-error-pages/</link>
            <pubDate>Wed, 11 Mar 2026 13:05:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare now returns RFC 9457-compliant structured Markdown and JSON error payloads to AI agents, replacing heavyweight HTML pages with machine-readable instructions. This reduces token usage by over 98%, turning brittle parsing into efficient control flow. ]]></description>
            <content:encoded><![CDATA[ <p>AI agents are no longer experiments. They are production infrastructure, making billions of HTTP requests per day, navigating the web, calling APIs, and orchestrating complex workflows.</p><p>But when these agents hit an error, they still receive the same HTML error pages we built for browsers: hundreds of lines of markup, CSS, and copy designed for human eyes. Those pages give agents clues, not instructions, and waste time and tokens. That gap is the opportunity to give agents instructions, not obstacles.</p><p>Starting today, Cloudflare returns <a href="https://www.rfc-editor.org/rfc/rfc9457">RFC 9457</a>-compliant structured Markdown and JSON error payloads to AI agents, replacing heavyweight HTML pages with machine-readable instructions.</p><p>That means when an agent sends <code>Accept: text/markdown</code>, <code>Accept: application/json</code>, or <code>Accept: application/problem+json</code> and encounters a Cloudflare error, we return one semantic contract in a structured format instead of HTML. And it comes complete with actionable guidance. (This builds on our recent <a href="https://blog.cloudflare.com/markdown-for-agents/">Markdown for Agents</a> release.)</p><p>So instead of being told only "You were blocked," the agent will read: "You were rate-limited — wait 30 seconds and retry with exponential backoff." Instead of just "Access denied," the agent will be instructed: "This block is intentional: do not retry, contact the site owner."</p><p>These responses are not just clearer — they are dramatically more efficient. Structured error responses cut payload size and token usage by more than 98% versus HTML, measured against a live 1015 ('rate-limit') error response. For agents that hit multiple errors in a workflow, the savings compound quickly.</p><p>This is live across the Cloudflare network, automatically. Site owners do not need to configure anything. Browsers keep getting the same HTML experience as before.</p><p>These are not just error pages. They are instructions for the agentic web.</p>
    <div>
      <h3>What agents see today</h3>
      <a href="#what-agents-see-today">
        
      </a>
    </div>
    <p>When an agent receives a Cloudflare-generated error, it usually means Cloudflare is enforcing customer policy or returning a platform response on the customer's behalf — not that Cloudflare is down. These responses are triggered when a request cannot be served as-is, such as invalid host or DNS routing, customer-defined access controls (WAF, geo, ASN, or bot rules), or edge-enforced limits like rate limiting. In short, Cloudflare is acting as the customer's routing and security layer, and the response explains why the request was blocked or could not proceed.</p><p>Today, those responses are rendered as HTML designed for humans:</p>
            <pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Access denied | example.com used Cloudflare to restrict access&lt;/title&gt;
&lt;style&gt;/* 200 lines of CSS */&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div class="cf-wrapper"&gt;
    &lt;h1 data-translate="block_headline"&gt;Sorry, you have been blocked&lt;/h1&gt;
    &lt;!-- ... hundreds more lines ... --&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
            <p>To an agent, this is garbage. It cannot determine what error occurred, why it was blocked, or whether retrying will help. Even if it parses the HTML, the content describes the error but doesn't tell the agent — or the human, for that matter — what to do next.</p><p>If you're an agent developer and you wanted to handle Cloudflare errors gracefully, your options were limited. For Cloudflare-generated errors, structured responses existed only in configuration-dependent paths, not as a consistent default for agents.</p><p>Custom Error Rules can customize many Cloudflare errors, including some 1xxx cases. But they depend on per-site configuration, so they cannot serve as a universal agent contract across the web. Cloudflare sits in front of the request path. That means we can define a default machine response: retry or stop, wait and back off, escalate or reroute. Error pages stop being decoration and become execution instructions.</p>
    <div>
      <h3>What we did</h3>
      <a href="#what-we-did">
        
      </a>
    </div>
    <p>Cloudflare now returns RFC 9457-compliant structured responses for all 1xxx-class error paths — Cloudflare's platform error codes for edge-side failures like DNS resolution issues, access denials, and rate limits. Both formats are live: <code>Accept: text/markdown</code> returns Markdown, <code>Accept: application/json</code> returns JSON, and <code>Accept: application/problem+json</code> returns JSON with the <code>application/problem+json</code> content type.</p><p>This covers all 1xxx-class errors today. The same contract will extend to Cloudflare-generated 4xx and 5xx errors next.</p><p>Markdown responses have two parts:</p><ul><li><p>YAML frontmatter for machine-readable fields</p></li><li><p>prose sections for explicit guidance (<code>What happened</code> and <code>What you should do</code>)</p></li></ul><p>JSON responses carry the same fields as a flat object.</p><p>The YAML frontmatter is the critical layer for automation. It lets an agent extract stable keys without scraping HTML or guessing intent from copy. Fields like <code>error_code</code>, <code>error_name</code>, and <code>error_category</code> let the agent classify the failure. <code>retryable</code> and <code>retry_after</code> drive backoff logic. <code>owner_action_required</code> tells the agent whether to keep trying or escalate. <code>ray_id</code>, <code>timestamp</code>, and <code>zone</code> make logs and support handoffs deterministic.</p><p>The schema is stable by design, so agents can implement durable control flow without chasing presentation changes.</p><p>That stability is not a Cloudflare invention. <a href="https://www.rfc-editor.org/rfc/rfc9457">RFC 9457 — Problem Details for HTTP APIs</a> defines a standard JSON shape for reporting errors over HTTP, so clients can parse error responses without knowing the specific API in advance. Our JSON responses follow this shape, which means any HTTP client that understands Problem Details can parse the base members without Cloudflare-specific code:</p><table><tr><td><p><b>RFC 9457 member</b></p></td><td><p><b>What it contains</b></p></td></tr><tr><td><p><code>type</code></p></td><td><p>A URI pointing to Cloudflare's documentation for the specific error code</p></td></tr><tr><td><p><code>status</code></p></td><td><p>The HTTP status code (matching the actual response status)</p></td></tr><tr><td><p><code>title</code></p></td><td><p>A short, human-readable summary of the problem</p></td></tr><tr><td><p><code>detail</code></p></td><td><p>A human-readable explanation specific to this occurrence</p></td></tr><tr><td><p><code>instance</code></p></td><td><p>The Ray ID identifying this specific error occurrence</p></td></tr></table><p>The operational fields — <code>error_code</code>, <code>error_category</code>, <code>retryable</code>, <code>retry_after</code>, <code>owner_action_required</code>, and more — are RFC 9457 extension members. Clients that don't recognize them simply ignore them.</p><p>This is network-wide and additive. Site owners do not need to configure anything. Browsers keep receiving HTML unless clients explicitly ask for Markdown or JSON.</p>
    <div>
      <h3>What the response looks like</h3>
      <a href="#what-the-response-looks-like">
        
      </a>
    </div>
    <p>Here is what a rate-limit error (<code>1015</code>) looks like in JSON:</p>
            <pre><code>{
  "type": "https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1015/",
  "title": "Error 1015: You are being rate limited",
  "status": 429,
  "detail": "You are being rate-limited by the website owner's configuration.",
  "instance": "9d99a4434fz2d168",
  "error_code": 1015,
  "error_name": "rate_limited",
  "error_category": "rate_limit",
  "ray_id": "9d99a4434fz2d168",
  "timestamp": "2026-03-09T11:11:55Z",
  "zone": "&lt;YOUR_DOMAIN&gt;",
  "cloudflare_error": true,
  "retryable": true,
  "retry_after": 30,
  "owner_action_required": false,
  "what_you_should_do": "**Wait and retry.** This block is transient. Wait at least 30 seconds, then retry with exponential backoff.\n\nRecommended approach:\n1. Wait 30 seconds before your next request\n2. If rate-limited again, double the wait time (60s, 120s, etc.)\n3. If rate-limiting persists after 5 retries, stop and reassess your request pattern",
  "footer": "This error was generated by Cloudflare on behalf of the website owner."
}</code></pre>
            <p>The same error in Markdown, optimized for model-first workflows:</p>
            <pre><code>---
error_code: 1015
error_name: rate_limited
error_category: rate_limit
status: 429
ray_id: 9d99a39dc992d168
timestamp: 2026-03-09T11:11:28Z
zone: &lt;YOUR_DOMAIN&gt;
cloudflare_error: true
retryable: true
retry_after: 30
owner_action_required: false
---

# Error 1015: You are being rate limited

## What Happened

You are being rate-limited by the website owner's configuration.

## What You Should Do

**Wait and retry.** This block is transient. Wait at least 30 seconds, then retry with exponential backoff.

Recommended approach:
1. Wait 30 seconds before your next request
2. If rate-limited again, double the wait time (60s, 120s, etc.)
3. If rate-limiting persists after 5 retries, stop and reassess your request pattern

---
This error was generated by Cloudflare on behalf of the website owner.
</code></pre>
            <p>Both formats give an agent everything it needs to decide and act: classify the error, choose retry behavior, and determine whether escalation is required. This is what a default machine contract looks like — not per-site configuration, but network-wide behavior. The contrast is explicit across error families: a transient error like <code>1015</code> says wait and retry, while intentional blocks like <code>1020</code> or geographic restrictions like <code>1009</code> tell the agent not to retry and to escalate instead.</p>
    <div>
      <h3>One contract, two formats</h3>
      <a href="#one-contract-two-formats">
        
      </a>
    </div>
    <p>The core value is not format choice. It is semantic stability.</p><p>Agents need deterministic answers to operational questions: retry or not, how long to wait, and whether to escalate. Cloudflare exposes one policy contract across two wire formats. Whether a client consumes Markdown or JSON, the operational meaning is identical: same error identity, same retry/backoff signals, same escalation guidance.</p><p>Clients that send <code>Accept: application/problem+json</code> get <code>application/problem+json; charset=utf-8</code> back — useful for HTTP client libraries that dispatch on media type. Clients that send <code>Accept: application/json</code> get <code>application/json; charset=utf-8</code> — same body, safe default for existing consumers.</p>
    <div>
      <h3>Size reduction and token efficiency</h3>
      <a href="#size-reduction-and-token-efficiency">
        
      </a>
    </div>
    <p>That contract is also dramatically smaller than what it replaces. Cloudflare HTML error pages are browser-oriented and heavy, while structured responses are compact by design.</p><p>Measured comparison for <code>1015</code>:</p><table><tr><td><p><b>Payload</b></p></td><td><p><b>Bytes</b></p></td><td><p><b>Tokens (cl100k_base)</b></p></td><td><p><b>Size vs HTML</b></p></td><td><p><b>Token vs HTML</b></p></td></tr><tr><td><p>HTML response</p></td><td><p>46,645</p></td><td><p>14,252</p></td><td><p>—</p></td><td><p>—</p></td></tr><tr><td><p>Markdown response</p></td><td><p>798</p></td><td><p>221</p></td><td><p>58.5x less</p></td><td><p>64.5x less</p></td></tr><tr><td><p>JSON response</p></td><td><p>970</p></td><td><p>256</p></td><td><p>48.1x less</p></td><td><p>55.7x less</p></td></tr></table><p>Both structured formats deliver a ~98% reduction in size and tokens versus HTML. For agents, size translates directly into token cost — when an agent hits multiple errors in one run, these savings compound into lower model spend and faster recovery loops.</p>
    <div>
      <h3>Ten categories, clear actions</h3>
      <a href="#ten-categories-clear-actions">
        
      </a>
    </div>
    <p>Every <code>1xxx</code> error is mapped to an <code>error_category</code>. That turns error handling into routing logic instead of brittle per-page parsing.</p><table><tr><td><p><b>Category</b></p></td><td><p><b>What it means</b></p></td><td><p><b>What the agent should do</b></p></td></tr><tr><td><p><code>access_denied</code></p></td><td><p>Intentional block: IP, ASN, geo, firewall rule</p></td><td><p>Do not retry. Contact site owner if unexpected.</p></td></tr><tr><td><p><code>rate_limit</code></p></td><td><p>Request rate exceeded</p></td><td><p>Back off. Retry after retry_after seconds.</p></td></tr><tr><td><p><code>dns</code></p></td><td><p>DNS resolution failure at the origin</p></td><td><p>Do not retry. Report to site owner.</p></td></tr><tr><td><p><code>config</code></p></td><td><p>Configuration error: CNAME, tunnel, host routing</p></td><td><p>Do not retry (usually). Report to site owner.</p></td></tr><tr><td><p><code>tls</code></p></td><td><p>TLS version or cipher mismatch</p></td><td><p>Fix TLS client settings. Do not retry as-is.</p></td></tr><tr><td><p><code>legal</code></p></td><td><p>DMCA or regulatory block</p></td><td><p>Do not retry. This is a legal restriction.</p></td></tr><tr><td><p><code>worker</code></p></td><td><p>Cloudflare Workers runtime error</p></td><td><p>Do not retry. Site owner must fix the script.</p></td></tr><tr><td><p><code>rewrite</code></p></td><td><p>Invalid URL rewrite output</p></td><td><p>Do not retry. Site owner must fix the rule.</p></td></tr><tr><td><p><code>snippet</code></p></td><td><p>Cloudflare Snippets error</p></td><td><p>Do not retry. Site owner must fix Snippets config.</p></td></tr><tr><td><p><code>unsupported</code></p></td><td><p>Unsupported method or deprecated feature</p></td><td><p>Change the request. Do not retry as-is.</p></td></tr></table><p>Two fields make this operationally useful for agents:</p><ul><li><p><code>retryable</code> answers whether a retry can succeed</p></li><li><p><code>owner_action_required</code> answers whether the problem must be escalated</p></li></ul><p>You can replace brittle "if status == 429 then maybe retry" heuristics with explicit control flow. Parse the frontmatter once, then branch on stable fields. A simple pattern is:</p><ul><li><p>if <code>retryable</code> is <code>true</code>, wait <code>retry_after</code> and retry</p></li><li><p>if <code>owner_action_required</code> is <code>true</code>, stop and escalate</p></li><li><p>otherwise, fail fast without hammering the site</p></li></ul><p>Here is a minimal Python example using that pattern:</p>
            <pre><code>import time
import yaml


def parse_frontmatter(markdown_text: str) -&gt; dict:
    # Expects: ---\n&lt;yaml&gt;\n---\n&lt;body&gt;
    if not markdown_text.startswith("---\n"):
        return {}
    _, yaml_block, _ = markdown_text.split("---\n", 2)
    return yaml.safe_load(yaml_block) or {}


def handle_cloudflare_error(markdown_text: str) -&gt; str:
    meta = parse_frontmatter(markdown_text)

    if not meta.get("cloudflare_error"):
        return "not_cloudflare_error"

    if meta.get("retryable"):
        wait_seconds = int(meta.get("retry_after", 30))
        time.sleep(wait_seconds)
        return f"retry_after_{wait_seconds}s"

    if meta.get("owner_action_required"):
        return f"escalate_owner_error_{meta.get('error_code')}"

    return "do_not_retry"</code></pre>
            <p>This is the key shift: agents are no longer inferring intent from HTML copy. They are executing explicit policy from structured fields.</p>
    <div>
      <h3>How to use it</h3>
      <a href="#how-to-use-it">
        
      </a>
    </div>
    <p>Send <code>Accept: text/markdown</code>, <code>Accept: application/json</code>, or <code>Accept: application/problem+json</code>.</p><p>For quick testing, you can hit any Cloudflare-proxied domain directly at <code>/cdn-cgi/error/1015</code> (or replace <code>1015</code> with another <code>1xxx</code> code).</p>
            <pre><code>curl -s --compressed -H "Accept: text/markdown" -A "TestAgent/1.0" -H "Accept-Encoding: gzip, deflate" "&lt;YOUR_DOMAIN&gt;/cdn-cgi/error/1015"
</code></pre>
            <p>Example with another error code:</p>
            <pre><code>curl -s --compressed -H "Accept: text/markdown" -A "TestAgent/1.0" -H "Accept-Encoding: gzip, deflate" "&lt;YOUR_DOMAIN&gt;/cdn-cgi/error/1020"
</code></pre>
            <p>JSON example:</p>
            <pre><code>curl -s --compressed -H "Accept: application/json" -A "TestAgent/1.0" -H "Accept-Encoding: gzip, deflate" "&lt;YOUR_DOMAIN&gt;/cdn-cgi/error/1015" | jq .
</code></pre>
            <p>RFC 9457 Problem Details example:</p>
            <pre><code>curl -s --compressed -H "Accept: application/problem+json" -A "TestAgent/1.0" -H "Accept-Encoding: gzip, deflate" "&lt;YOUR_DOMAIN&gt;/cdn-cgi/error/1015" | jq .
</code></pre>
            <p>The behavior is deterministic — the first explicit structured type wins:</p><table><tr><td><p><b>Accept header</b></p></td><td><p><b>Response</b></p></td></tr><tr><td><p><code>application/json</code></p></td><td><p>JSON</p></td></tr><tr><td><p><code>application/json; charset=utf-8</code></p></td><td><p>JSON</p></td></tr><tr><td><p><code>application/problem+json</code></p></td><td><p>JSON (application/problem+json content type)</p></td></tr><tr><td><p><code>application/json, text/markdown;q=0.9</code></p></td><td><p>JSON</p></td></tr><tr><td><p><code>application/json, text/markdown</code></p></td><td><p>JSON (equal q, first-listed wins)</p></td></tr><tr><td><p><code>text/markdown</code></p></td><td><p>Markdown</p></td></tr><tr><td><p><code>text/markdown, application/json</code></p></td><td><p>Markdown (equal q, first-listed wins)</p></td></tr><tr><td><p><code>text/markdown, */*</code></p></td><td><p>Markdown</p></td></tr><tr><td><p><code>text/*</code></p></td><td><p>Markdown</p></td></tr><tr><td><p><code>*/*</code></p></td><td><p>HTML (default)</p></td></tr></table><p>Wildcard-only requests (<code>*/*</code>) do not signal a structured preference; clients must explicitly request Markdown or JSON.</p><p>If the request succeeds, you get normal origin content. The header only affects Cloudflare-generated error responses.</p>
    <div>
      <h3>Real-world use cases</h3>
      <a href="#real-world-use-cases">
        
      </a>
    </div>
    <p>There are a number of situations where structured error responses help immediately:</p><ol><li><p>Agent blocked by WAF rule (<code>1020</code>). The agent parses <code>error_code</code>, records <code>ray_id</code>, and stops retrying. It can escalate with useful context instead of looping.</p></li><li><p>MCP (Model Context Protocol) tool hitting geo restriction (<code>1009</code>). The tool gets a clear, machine-readable reason, returns it to the orchestrator, and the workflow can choose an alternate path or notify the user.</p></li><li><p>Rate-limited crawler (<code>1015</code>). The agent reads <code>retryable</code>: true and <code>retry_after</code>, applies backoff, and retries predictably instead of hammering the endpoint.</p></li><li><p>Developer debugging with <code>curl</code>. The developer can reproduce exactly what the agent sees, including frontmatter and guidance, without reverse-engineering HTML.</p></li><li><p>HTTP client libraries that understand RFC 9457. Any client that dispatches on <code>application/problem+json</code> or parses Problem Details objects can handle Cloudflare errors without Cloudflare-specific code.</p></li></ol><p>In each case, the outcome is the same: less guessing, fewer wasted retries, lower model cost, and faster recovery.</p>
    <div>
      <h3>Try it now</h3>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>Send a structured <code>Accept</code> header and test against any Cloudflare-proxied domain:</p>
            <pre><code>curl -s --compressed -H "Accept: text/markdown" -A "TestAgent/1.0" -H "Accept-Encoding: gzip, deflate" "&lt;YOUR_DOMAIN&gt;/cdn-cgi/error/1015"
</code></pre>
            
            <pre><code>curl -s --compressed -H "Accept: application/json" -A "TestAgent/1.0" -H "Accept-Encoding: gzip, deflate" "&lt;YOUR_DOMAIN&gt;/cdn-cgi/error/1015" | jq .
</code></pre>
            
            <pre><code>curl -s --compressed -H "Accept: application/problem+json" -A "TestAgent/1.0" -H "Accept-Encoding: gzip, deflate" "&lt;YOUR_DOMAIN&gt;/cdn-cgi/error/1015" | jq .
</code></pre>
            <p>Error pages are the first conversation between Cloudflare and an agent. This launch makes that conversation structured, standards-compliant, and cheap to process.</p><p>To make this work across the web, agent runtimes should default to explicit structured <code>Accept</code> headers, not bare <code>*/*</code>. Use <code>Accept: text/markdown, */*</code> for model-first workflows and <code>Accept: application/json, */*</code> for typed control flow. If you maintain an agent framework, SDK, or browser automation stack, ship this default and treat bare <code>*/*</code> as legacy fallback.</p><p>And it is only the first layer. We are building the rest of the agent stack on top of it: <a href="https://developers.cloudflare.com/ai-gateway/"><u>AI Gateway</u></a> for routing, controls, and observability; <a href="https://www.cloudflare.com/developer-platform/products/workers-ai/"><u>Workers AI</u></a> for inference; and the identity, security, and access primitives agents will need to operate safely at Internet scale.</p><p>Cloudflare is helping our customers deliver content in agent-friendly ways, and this is just the start. If you're building or operating agents, start at <a href="http://agents.cloudflare.com"><u>agents.cloudflare.com</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[AI]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Edge Computing]]></category>
            <guid isPermaLink="false">46xdz0GQfFtpCKRKNbfj3b</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Recapping Speed Week 2023]]></title>
            <link>https://blog.cloudflare.com/recapping-speed-week-2023/</link>
            <pubDate>Mon, 26 Jun 2023 13:00:07 GMT</pubDate>
            <description><![CDATA[ Recapping all the announcements made during Speed Week 2023 ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3DeV5qyuJURugZstsQsWeI/cc264d475cbbbe3079bf1e6569ed2bf5/image1-42.png" />
            
            </figure><p>Speed Week 2023 is officially a wrap.</p><p>In our <a href="/welcome-to-speed-week-2023/">Welcome to Speed Week 2023</a> blog post, we set a clear goal:</p><blockquote><p><i><b>“This week we will help you measure what matters. We’ll help you gain insight into your performance, from Zero Trust and API’s to websites and applications. And finally we’ll help you get faster. Quickly.”.</b></i></p></blockquote><p>This week we published five posts on how to measure performance, explaining which metrics and approaches make sense and why. We had a deep dive on the latest Core Web Vital, “<a href="/inp-get-ready-for-the-new-core-web-vital/">Interaction to Next Paint</a>”, what it means and how we can help. There was a post on Time To First Byte (TTFB) and why it isn't a <a href="/ttfb-is-not-what-it-used-to-be/">good</a> way to measure good web performance. We also wrote about how to <a href="/how-we-think-about-zero-trust-performance/">measure</a> Zero Trust performance, and announced the <a href="/introducing-radar-internet-quality-page/">Internet</a> Quality page of Cloudflare Radar - giving everyone the ability to compare Internet connection quality across Internet Service Providers, countries, and more.</p><p>We launched new products such as <a href="/cloudflare-observatory-generally-available/">Observatory</a>, <a href="/digital-experience-monitoring-beta/">Digital Experiencing Monitoring</a> and <a href="/introducing-timing-insights/">Timing Insights</a>. These products give an incredible window into how your applications and websites are performing through the eyes of website visitors and your employees.</p><p>Next, we showed how we continue to be the fastest, with fresh posts on how we have the <a href="/speed-week-2023-network-performance-update/">fastest network</a>, <a href="/spotlight-on-zero-trust/">fastest Secure Web Gateway</a>, <a href="/spotlight-on-zero-trust/">fastest Zero Trust Network Access</a> and <a href="/spotlight-on-zero-trust/">fastest Remote Browser Isolation</a> solutions. There was even an update on <a href="/cloudflare-connected-in-over-300-cities/">how our global network grew to 300 cities</a>. The Cloudflare network is at the center of everything we do, and every product we build benefits from the speed and scale it provides and the proximity to the user.</p><p>There were also a number of great product announcements which make speed simple, single button performance boosts to accelerate your traffic. <a href="/smart-hints/">Smart Hints</a>, <a href="/better-http-3-prioritization-for-a-faster-web/">HTTP/3 Prioritization,</a> <a href="/turbo-charge-gaming-and-streaming-with-argo-for-udp/">Argo for UDP</a>, <a href="/this-is-brotli-from-origin/">Brotli end-to-end</a>, <a href="/low-latency-hls-support-for-cloudflare-stream/">LL-HLS for Stream</a> and <a href="/speeding-up-apis-ricochet-for-api-gateway/">Ricochet for API Gateway</a> all make speed simple - giving you an immediate speed boost on your traffic for <i>very</i> minimal, if any configuration.</p><p>We also showed how <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">AI</a> / ML continue to play a big part at Cloudflare, with posts discussing why running <a href="/globally-distributed-ai-and-a-constellation-update/">AI inference on Cloudflare's network</a> makes performance sense, and how we both <a href="/scalable-machine-learning-at-cloudflare/">scale and run</a> machine learning at the <a href="/how-cloudflare-runs-ml-inference-in-microseconds/">microseconds level.</a></p><p>Finally, we wrote about how we are making it easier than ever for customers to migrate to Cloudflare from legacy vendors via our <a href="/turpentine-v2-migration-program/">Turpentine</a> and <a href="/descaler-program-update/">Descaler</a> programs.</p><p>We’re on a mission to be the fastest at everything we do, and to make it simple for our customers to get the best performance.</p><p>In case you missed any of the announcements, take a look at the summary and navigation guide below.</p>
    <div>
      <h3>AI / Machine Learning</h3>
      <a href="#ai-machine-learning">
        
      </a>
    </div>
    
<table>
<thead>
  <tr>
    <th><span>Announcement</span></th>
    <th><span>Summary</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/globally-distributed-ai-and-a-constellation-update/"><span>Globally distributed AI and a Constellation update </span></a></td>
    <td><span>Announcing new Constellation features, explaining why it’s the first globally distributed AI platform and why deploying your machine learning tasks in our global network is advantageous.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/scalable-machine-learning-at-cloudflare/"><span>Every request, every second: scalable machine learning at Cloudflare</span></a></td>
    <td><span>Describing the technical strategies that have enabled us to expand the number of machine learning features and models, all while substantially reducing the processing time for each HTTP request on our network.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/orpheus-saves-internet-requests-while-maintaining-speed/"><span>How Orpheus automatically routes around bad Internet weather</span></a></td>
    <td><span>A little less than two years ago, Cloudflare made Orpheus automatically available to all customers for free. Since then, Orpheus has saved 132 billion Internet requests from failing by intelligently routing them around connectivity outages, prevented 50+ Internet incidents from impacting our customers, and made our customer’s origins more reachable to everyone on the Internet. Let’s dive into how Orpheus accomplished these feats over the last year.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/how-cloudflare-runs-ml-inference-in-microseconds/"><span>How Cloudflare runs machine learning inference in microseconds</span></a></td>
    <td><span>How we optimized bot management’s machine learning model execution. To reduce processing latency, we've undertaken a project to rewrite our bot management technology, porting it from Lua to Rust, and applying a number of performance optimizations. This post focuses on optimizations applied to the machine-learning detections within the bot management module, which account for approximately 15% of the latency added by bot detection. By switching away from a garbage collected language, removing memory allocations, and optimizing our parsers, we reduce the P50 latency of the bot management module by 79μs - a 20% reduction.</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h3>Zero Trust</h3>
      <a href="#zero-trust">
        
      </a>
    </div>
    
<table>
<thead>
  <tr>
    <th><span>Announcement</span></th>
    <th><span>Summary</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/spotlight-on-zero-trust/"><span>Spotlight on Zero Trust: we're fastest and here's the proof</span></a></td>
    <td><span>Cloudflare is the fastest Secure Web Gateway in 42% of testing scenarios, the most of any provider. Cloudflare is 46% faster than Zscaler, 56% faster than Netskope, and 10% faster than Palo Alto for ZTNA, and 64% faster than Zscaler for RBI scenarios.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/digital-experience-monitoring-beta/"><span>Understanding end user-connectivity and performance with Digital Experience Monitoring, now available in beta </span></a></td>
    <td><span>DEX allows administrators to monitor their WARP Deployment and create predefined application tests. Features include live team &amp; device analytics, server and traceroute tests, Synthetic Application Monitoring, and Fleet Status for real-time insights on WARP deployment.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/descaler-program-update/"><span>Descale your network with Cloudflare’s enhanced Descaler Program</span></a></td>
    <td><span>The speed at which customers are able to move from Zscaler ZIA to Cloudflare Gateway continually gets faster. It usually takes more time to set up a meeting with the right technical administrators than to migrate settings, configurations, lists, policies and more to Cloudflare.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/masque-building-a-new-protocol-into-cloudflare-warp/"><span>Donning a MASQUE: building a new protocol into Cloudflare WARP</span></a></td>
    <td><span>Announcing support for MASQUE, a cutting-edge new protocol for the beta version of our consumer WARP iOS app.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/how-we-think-about-zero-trust-performance/"><span>How we think about Zero Trust Performance</span></a></td>
    <td><span>There are many ways to view network performance. However, at Cloudflare we believe the best way to measure performance is to use end-to-end HTTP response measurements. In this blog, we’re going to talk about why end-to-end performance is the most important thing to look at, why other methods like proxy latency and decrypted latency SLAs are insufficient for performance evaluations, and how you can measure your Zero Trust performance like we do.</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h3>Measuring what matters</h3>
      <a href="#measuring-what-matters">
        
      </a>
    </div>
    
<table>
<thead>
  <tr>
    <th><span>Announcement</span></th>
    <th><span>Summary</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/introducing-radar-internet-quality-page/"><span>Introducing the Cloudflare Radar Internet Quality Page</span></a></td>
    <td><span>The new Internet Quality page on Cloudflare Radar provides both country and network (autonomous system) level insight into Internet connection performance (bandwidth) and quality (latency, jitter) over time based on benchmark test data as well as speed.cloudflare.com test results.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/speed-week-2023-network-performance-update/"><span>Network performance update: Speed Week 2023</span></a></td>
    <td><span>A blog post that shares the most recent network performance updates, and tells you about our tools and processes that we use to monitor and improve our network performance.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/introducing-timing-insights/"><span>Introducing Timing Insights: new performance metrics via our GraphQL API</span></a></td>
    <td><span>If you care about the performance of your website or APIs, it’s critical to understand why things are slow. We're introducing new analytics tools to help you understand what is contributing to "Time to First Byte" (TTFB) of Cloudflare and your origin. But wait – maybe you've heard that you should stop worrying about TTFB? Isn't Cloudflare moving away from TTFB as a metric? Read on to understand why there are still situations where TTFB matters.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/ttfb-is-not-what-it-used-to-be/"><span>Are you measuring what matters? A fresh look at Time To First Byte</span></a></td>
    <td><span>Time To First Byte (TTFB) is not a good way to measure your websites performance. In this blog we’ll cover what TTFB is a good indicator of, what it's not great for, and what you should be using instead.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/inp-get-ready-for-the-new-core-web-vital/"><span>INP. Get ready for the new Core Web Vital</span></a></td>
    <td><span>On May 10, 2023, Google announced that INP will replace FID in the Core Web Vitals in March 2024. The Core Web Vitals play a role in the Google Search algorithm. Website owners who care about Search Engine Optimization (SEO) should prepare for the change. In this post we outline what INP is, and how you can prepare.</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h3>Speed made simple</h3>
      <a href="#speed-made-simple">
        
      </a>
    </div>
    
<table>
<thead>
  <tr>
    <th><span>Announcement</span></th>
    <th><span>Summary</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/cloudflare-observatory-generally-available/"><span>Faster website, more customers: Cloudflare Observatory can help your business grow</span></a></td>
    <td><span>Cloudflare users can now easily <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">monitor website performance</a> using Real User Monitoring (RUM) data along with scheduled tests from different regions in a single dashboard. This will identify any performance issues your website may have. Once we’ve identified any issues, Observatory will highlight customized recommendations to resolve these issues, all with a single click.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/smart-hints/"><span>Smart Hints make code-free performance simple</span></a></td>
    <td><span>We’re excited to announce we’re making Early Hints and Fetch Priorities automatic using the power of Cloudflare’s network.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/better-http-3-prioritization-for-a-faster-web/"><span>Introducing HTTP/3 Prioritization</span></a></td>
    <td><span>Announcing full support for HTTP/3 Extensible Priorities, a new standard that speeds the loading of webpages by up to 37%.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/turbo-charge-gaming-and-streaming-with-argo-for-udp/"><span>Argo Smart Routing for UDP: speeding up gaming, real-time communications and more </span></a></td>
    <td><span>Announcing we’re bringing traffic acceleration to customer’s UDP traffic. Now, users can improve the latency of UDP-based applications like video games, voice calls, and video meetings by up to 17%.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/this-is-brotli-from-origin/"><span>All the way up to 11: Serve Brotli from origin and Introducing Compression Rules</span></a></td>
    <td><span>Enhancing our support for Brotli compression, enabling end-to-end Brotli compression for web content. Compression plays a vital role in reducing bytes during transfers, ensuring quicker downloads and seamless browsing.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/performance-experiments-with-cloudflare/"><span>How to use Cloudflare Observatory for performance experiments</span></a></td>
    <td><span>Introducing Cloudflare's Performance Experiments in Observatory: Safely test code, improve website speed, and minimize risk.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/low-latency-hls-support-for-cloudflare-stream/"><span>Introducing Low-Latency HLS Support for Cloudflare Stream</span></a></td>
    <td><span>Broadcast live to websites and applications with less than 10 second latency with Low-Latency HTTP Live Streaming (LL-HLS), now in beta with Cloudflare Stream.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/speeding-up-apis-ricochet-for-api-gateway/"><span>Speeding up APIs with Ricochet for API Gateway</span></a></td>
    <td><span>Announcing Ricochet for API Gateway, the easiest way for Cloudflare customers to achieve faster API responses through automatic, intelligent API response caching.</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h3>But wait, there’s more</h3>
      <a href="#but-wait-theres-more">
        
      </a>
    </div>
    
<table>
<thead>
  <tr>
    <th><span>Announcement</span></th>
    <th><span>Summary</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/cloudflare-snippets-alpha/"><span>Cloudflare Snippets is now available in alpha</span></a></td>
    <td><span>Cloudflare Snippets are available in alpha. Snippets are a simple way of executing a small piece of Javascript on select HTTP requests, using the ruleset engine filtering logic.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/how-we-decreased-pages-latency/"><span>Making Cloudflare Pages the fastest way to serve your sites</span></a></td>
    <td><span>Pages is now the fastest way to serve your sites across Netlify, Vercel and many others.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/cloudflare-connected-in-over-300-cities/"><span>Cloudflare's global network grows to 300 cities and ever closer to end users with connections to 12,000 networks</span></a></td>
    <td><span>We are pleased to announce that Cloudflare is now connected to over 12,000 Internet networks in over 300 cities around the world.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/turpentine-v2-migration-program/"><span>It's never been easier to migrate thanks to Cloudflare's new Migration Hub</span></a></td>
    <td><span>Relaunching Turpentine, a service for moving away from Varnish Control Language (VCL). Introducing Cloudflare's new Migration Hub. The Migration Hub serves as a one-stop-shop for all migration needs, featuring brand-new migration guides that bring transparency and simplicity to the process.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/rethinking-cache-purge-architecture/"><span>Part 2: Rethinking cache purge with a new architecture</span></a></td>
    <td><span>Discussing architecture improvements we’ve made so far for Cache Purge and what we’re working on now.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/speeding-up-your-website-in-a-few-clicks/"><span>Speeding up your (WordPress) website is a few clicks away</span></a></td>
    <td><span>In this blog, we will explain where the opportunities exist to improve website performance, how to check if a specific site can improve performance, and provide a small JavaScript snippet which can be used with Cloudflare Workers to do this optimization for you.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/benchmarking-dashboard-performance/"><span>Benchmarking dashboard performance</span></a></td>
    <td><span>The Cloudflare dashboard is a single page application that houses all of the UI for our wide portfolio of existing products, as well as the new features we're releasing every day.</span></td>
  </tr>
  <tr>
    <td><span>Workers KV is faster than ever with a new architecture</span></td>
    <td><span>With the new architecture powering Workers KV our service will become faster and more scalable than ever. We have significantly reduced cold read probability, and enabled KV to serve over a trillion requests a month.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/how-kinsta-used-workers-and-workers-kv-to-improve-cache-hit-rates/"><span>How Kinsta used Workers and Workers KV to improve cache hit rates by 56%</span></a></td>
    <td><span>Kinsta delivers tailored cloud hosting solutions to over 26,000 companies across 128 countries. Learn how they used Workers and Workers KV to improve cache performance and customer performance.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/a-step-by-step-guide-to-transferring-domains-to-cloudflare/"><span>A step-by-step guide to transferring domains to Cloudflare</span></a></td>
    <td><span>Transferring your domains to a new registrar isn’t something you do every day, and getting any step of the process wrong could mean downtime and disruption. We’ve built a domain transfer checklist to help you quickly and safely transfer your domains to Cloudflare.</span></td>
  </tr>
  <tr>
    <td><a href="http://staging.blog.mrk.cfdata.org/how-cloudflare-scaled-and-protected-eurovision-2023-voting/"><span>How we scaled and protected Eurovision 2023 voting with Pages and Turnstile </span></a></td>
    <td><span>More than 162 million fans tuned in to the 2023 Eurovision Song Contest, the first year that non-participating countries could also vote. Cloudflare helped scale and protect the voting application using our rapid DNS infrastructure, CDN, Cloudflare Pages and Turnstile.</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <p>Here's a summary of the Speed Week on Cloudflare TV:</p><div></div>
<p></p><p>If you missed any of the announcements or want to also view the associated Cloudflare TV segments, where blog authors went through each announcement, you can now watch all the <a href="https://cloudflare.tv/shows/speed-week">Speed Week videos on Cloudflare TV</a>.</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <guid isPermaLink="false">39ZDGVum7GoIyX91GEskT</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[It's never been easier to migrate thanks to Cloudflare's new Migration Hub]]></title>
            <link>https://blog.cloudflare.com/turpentine-v2-migration-program/</link>
            <pubDate>Wed, 21 Jun 2023 13:00:21 GMT</pubDate>
            <description><![CDATA[ Today, we are thrilled to relaunch Turpentine, and introduce Cloudflare's new Migration Hub. The Migration Hub serves as a one-stop-shop for all migration needs, featuring brand-new migration guides that bring transparency and simplicity to the process ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3ULoJnoexuvfEnYee3H6gB/f3792dffc4c66705f300de27c0d404d4/image1-21.png" />
            
            </figure><p>We understand the pain points associated with CDN migrations. That's why in late 2021 we introduced <a href="/announcing-turpentine/">Turpentine</a>, a project to perform the process of translating the old Varnish Configuration Language (VCL) into Cloudflare Workers with just a push of a button. After nearly two years of testing and user feedback, we’ve tailored the migration processes for different user groups.</p><p>Today, we are thrilled to relaunch Turpentine, and introduce Cloudflare's new <a href="https://www.cloudflare.com/migration-hub">Migration Hub</a>. The Migration Hub serves as a one-stop-shop for all migration needs, featuring brand-new migration guides that bring transparency and simplicity to the process.</p><p>We also know that a large number of customers aren't comfortable doing migrations themselves. Years of built up business logic makes unpacking and translating CDN configurations between different vendors difficult and locks businesses into subpar products and services. To help these customers we have established a Professional Services group to ensure smooth migrations for customers transitioning to Cloudflare’s first-class products. Going forward, we plan to continue to invest resources in Turpentine to ensure that moving to any part of Cloudflare is easy and you have the help you need.</p>
    <div>
      <h3>Why choose Cloudflare?</h3>
      <a href="#why-choose-cloudflare">
        
      </a>
    </div>
    <p>Cloudflare has gained immense popularity among businesses seeking to improve website performance, security, and reliability. The demand for Cloudflare's CDN services has skyrocketed, with an ever-increasing number of companies wanting to use our services to help protect their web properties. It became evident that a more streamlined approach was needed to empower customers to self-guide through the onboarding process if they wanted.</p><p>That’s why we’ve shipped guides to help bring transparency to the migration process, compare Cloudflare's Rules or Workers to VCL or XML configurations, and provide mappings of different products between vendors. This resource serves as a repository of information and step-by-step guidance for those seeking to move to Cloudflare. These guides are designed to empower customers to take control of their onboarding journey by providing them with the tools and resources they need to understand how to successfully implement Cloudflare's first-class products without needing to talk to anyone.</p><p>As new features and enhancements are introduced to Cloudflare, the landing page will be updated to reflect these changes.</p><p>However, undertaking the onboarding process independently can be daunting for some businesses. We understand that every organization is unique, with specific requirements and challenges. To address this concern, Cloudflare has established a dedicated Professional Services team. This team of experts works closely with customers, taking the time to understand their environments, assess their needs, and provide tailored guidance and support throughout the migration process. With the help of the professional services team, businesses can transition to Cloudflare being guided by an experienced team to ensure a timely, smooth and successful migration. Using the Migration Hub, you can get in contact with the Professional Services team to help your migration journey.</p><p>Whether you prefer self-guided exploration or expert guidance, the Cloudflare Migration Hub has everything you need to make your migration journey a success.</p>
    <div>
      <h3>Self-serve guides</h3>
      <a href="#self-serve-guides">
        
      </a>
    </div>
    <p>Our commitment to transparency and empowering our customers led us to create comprehensive public-facing guides that provide valuable insights into how CDN products compare and overlap. With these guides, you can gain a clear understanding of the features and capabilities offered by Cloudflare, and how they map between CDN offerings you might be more familiar with.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/14YS46rccPU0Q32IafWrkT/d1a04090a72d131170a126778696ef87/image2-14.png" />
            
            </figure><p>Example of mapping Fastly products to Cloudflare</p><p>The migration guides include product maps that show how you can <a href="https://www.cloudflare.com/cloudflare-vs-akamai/">match Cloudflare features to Akamai</a> or Fastly features and how to configure them. Using this information, migration should just be about matching up rules and implementing instead of translating feature names between vendors or fiddling with ChatGPT prompts to correctly (or incorrectly!) translate code from one vendor to the other. There are also numerous examples of how certain configurations have been accomplished with code examples that help customers configure and understand their current configuration and translate them into Cloudflare products, easily. Check them out <a href="https://www.cloudflare.com/migration-hub/">here</a>.</p><p>Not only that, but Cloudflare’s commitment to providing numerous free tools across our network means anyone can sign-up and get access to much of our platform without needing to talk to anyone. We believe in giving you the tools and knowledge you need to navigate the migration and testing process independently, while knowing that our support is just a click away whenever you need it.</p>
    <div>
      <h3>Let us do it for you with Professional Services</h3>
      <a href="#let-us-do-it-for-you-with-professional-services">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3Ru6CtXng70SQY47jptHh5/02f6eafa8695b6e33c01a06f64aefd28/image3-12.png" />
            
            </figure><p>We're also incredibly excited to introduce our dedicated team of migration experts, known as Professional Services, who are here to assist you throughout the entire process. The Professional Service team will work closely with you, offering their expertise and guiding you through each step to ensure a seamless transition onto Cloudflare’s products.</p><p>Too often, we meet with customers who have been intimidated by the complexity of their current CDN vendor. They had help setting it up by a third party and have experienced the nervousness of trying to change things without knowing what impacts it could have downstream. This is compounded by different CDNs using different terminology for essentially the same concepts.</p><p>Professional Services is here to help guide your onboarding experience and cut through that uncertainty.</p><p>From providing in-depth knowledge about the migration process and tooling to addressing any specific challenges you may encounter, our Professional Services team is committed to making your migration experience as smooth and efficient as possible. With Cloudflare's Professional Services, you can confidently embark on your migration journey, knowing that our experts will handle the complexities while empowering you to drive the migration process forward.</p>
    <div>
      <h3>Success Stories</h3>
      <a href="#success-stories">
        
      </a>
    </div>
    <p>By leveraging Cloudflare's migration solutions, numerous businesses have achieved remarkable results, including improved performance, enhanced security, and streamlined pricing. These success stories serve as a testament to the effectiveness and reliability of Cloudflare's migration offerings.</p>
    <div>
      <h3>Improve cost and performance by migrating to Cloudflare</h3>
      <a href="#improve-cost-and-performance-by-migrating-to-cloudflare">
        
      </a>
    </div>
    <p><i>A mobile communications leader successfully migrated its public website, </i><b><i>after 20 years with Akamai</i></b><i>, to Cloudflare for a better digital experience plus &gt;</i><b><i>20% cost savings</i></b><i>.</i></p><p>The company’s decision to decentralize purchasing of CDN services illuminated the high cost of using Akamai for its public-facing websites.</p><p>A short proof-of-concept of Cloudflare Application Performance suite resulted in measurable cost savings and performance improvements. It was also determined the flexibility to integrate additional Cloudflare tools, like Workers for serverless compute offerings, would enable the organization to scale further when ready.</p>
    <div>
      <h3>Avoid reliability concerns by migrating to Cloudflare</h3>
      <a href="#avoid-reliability-concerns-by-migrating-to-cloudflare">
        
      </a>
    </div>
    <p>A UK sporting giant with a devoted international fan community was deeply concerned about their spikey traffic associated with game days. Often these matches saw 10x the normal website traffic. Unfortunately, incumbent vendors weren’t up for the challenge of providing the performance and uptime reliability to their fans during these game day traffic spikes.</p><p>After migrating to Cloudflare, the results spoke for themselves. In one 24-hour match day, the site received over 11 million requests. Cloudflare’s cache served over 93% of them with eaze while providing a 100% uptime guarantee.</p>
    <div>
      <h3>Get started today</h3>
      <a href="#get-started-today">
        
      </a>
    </div>
    <p>We invite you to visit our <a href="https://www.cloudflare.com/migration-hub/">Migration Hub</a> and explore our comprehensive offerings.</p><p>Migrating from one CDN to another can be a daunting task, but with Cloudflare's Migration Hub and Professional Services, the process becomes more straightforward and hassle-free. We are committed to empowering our customers with the resources, support, and expertise needed to transition smoothly to Cloudflare's advanced solutions.</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Migration Hub]]></category>
            <category><![CDATA[Project Turpentine]]></category>
            <guid isPermaLink="false">3OdOvmn2cFOndmeYcJdpDB</guid>
            <dc:creator>Sam Marsh</dc:creator>
            <dc:creator>Alex Krivit</dc:creator>
        </item>
        <item>
            <title><![CDATA[Faster website, more customers: Cloudflare Observatory can help your business grow]]></title>
            <link>https://blog.cloudflare.com/cloudflare-observatory-generally-available/</link>
            <pubDate>Tue, 20 Jun 2023 13:01:00 GMT</pubDate>
            <description><![CDATA[ Today, we are thrilled to unveil the Cloudflare Observatory, our new and enhanced Speed Tab. Cloudflare customers now have access to a suite of powerful tools that simplify performance monitoring and offer enhanced product recommendations ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/l5JdoDTmgX5Drw6icAU4C/8ee6f982957a39ebd0c2d920e05f5e1d/image2-10.png" />
            
            </figure><p>Website performance is crucial to the success of online businesses. <a href="https://www2.deloitte.com/content/dam/Deloitte/ie/Documents/Consulting/Milliseconds_Make_Millions_report.pdf">Study</a> after <a href="https://www.thinkwithgoogle.com/_qs/documents/4290/c676a_Google_MobileSiteSpeed_Playbook_v2.1_digital_4JWkGQT.pdf">study</a> has shown that an increased load time directly affects sales. In highly competitive markets the performance of a website is crucial for success. Just like a physical shop situated in a remote area faces challenges in attracting customers, a slow website encounters similar difficulties in attracting traffic. It is vital to measure and improve website performance to enhance user experience and maximize online engagement. Results from testing at home don’t take into account how your customers in different countries, on different devices, with different Internet connections experience your website.</p><p>Simply put, you might not know how your website is performing. And that could be costing your business money every single day.</p><p>Today we are excited to announce Cloudflare Observatory - the new home of performance at Cloudflare.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3YCbpN3EBU1ghiF16bNtGL/3595d69a77ec537b37b24871f6f015d9/pasted-image-0.png" />
            
            </figure><p>Cloudflare users can now easily monitor website performance using Real User Monitoring (RUM) data along with scheduled tests from different regions in a single dashboard. This will identify any performance issues your website may have. The best bit? Once we’ve identified any issues, Observatory will highlight customized recommendations to resolve these issues, all with a single click.</p><p>Making your website faster just got a lot easier.</p>
    <div>
      <h3>I feel the need. The need for speed!</h3>
      <a href="#i-feel-the-need-the-need-for-speed">
        
      </a>
    </div>
    <p>Having a fast website is crucial for achieving online success. According to <a href="https://www.thinkwithgoogle.com/_qs/documents/4290/c676a_Google_MobileSiteSpeed_Playbook_v2.1_digital_4JWkGQT.pdf">Google</a>, even a one-second improvement in load time can boost mobile conversions by up to 27%.</p><p>A study from <a href="https://www2.deloitte.com/content/dam/Deloitte/ie/Documents/Consulting/Milliseconds_Make_Millions_report.pdf">Deloitte</a> found “<i>With a 0.1s improvement in site speed, we observed that retail consumers spent almost 10% more</i>”. Another <a href="https://www.thinkwithgoogle.com/_qs/documents/4290/c676a_Google_MobileSiteSpeed_Playbook_v2.1_digital_4JWkGQT.pdf">study</a>, from Google, found “<i>53% will leave a mobile site if it takes more than 3 seconds to load</i>”. There is a very real link between <b>website performance</b> and <b>business success.</b></p><p>In today's digital landscape, customers expect instant access to information and seamless browsing experiences. We have all encountered the frustration of waiting for a website to load, often leading us to click the back button and click on the next link. For ecommerce sites, this delay directly translates to lost revenue as users quickly navigate elsewhere.</p><p>This importance is further amplified in the world of <a href="https://www.cloudflare.com/learning/performance/how-website-speed-boosts-seo/">Search Engine Optimization</a> (SEO). In May 2021, Google announced that page speed would be incorporated into their ranking algorithm, highlighting the significance of fast-loading web pages for higher search engine rankings.</p>
    <div>
      <h3>Introducing Observatory</h3>
      <a href="#introducing-observatory">
        
      </a>
    </div>
    <p>In 2019, we launched the <a href="/new-speed-page/">new Speed Tab</a> with the mission to address two crucial questions: "How fast is my website after moving to Cloudflare?" and "How fast could it be?" This tab allowed customers to compare their website's performance before and after enabling Cloudflare features. However, it required users to delve into analytics and analyze traffic patterns and cache hit ratios to optimize their sites, which proved challenging for new Cloudflare users.</p><p>To address this, we developed Observatory, a fresh approach to <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">performance monitoring</a> at Cloudflare. Observatory fills the gap that previously existed in understanding website performance and simplifies the process of addressing performance issues by providing tailored recommendations.</p><p>Observatory integrates <a href="/start-measuring-web-vitals-with-browser-insights/">Real-User Monitoring (RUM)</a> data, which enables users to understand their website's performance as experienced by their end users across the globe. By leveraging RUM data we can show valuable insight into the areas of the website that can be optimized and surface Cloudflare features and functionality that can address these issues.</p><p>Additionally, Observatory incorporates <a href="https://developer.chrome.com/docs/lighthouse/overview/">Google Lighthouse</a>, the industry standard tool for evaluating web performance. We replaced <a href="https://www.webpagetest.org/lighthouse">WebPageTest</a> with Lighthouse due to its versatility and widespread adoption in the performance community. With Lighthouse, users can run, schedule, and access Lighthouse performance reports directly in the Cloudflare dashboard.</p><p>Observatory also enables regional testing, recognizing the importance of understanding performance variations across different locations. By simulating website performance in different regions, users can understand if their webpage performs well in certain countries and poorly in others. This enables users to optimize their websites for a global audience, ensuring consistent and fast user experiences regardless of location.</p><p>Observatory becomes your unified place within the Cloudflare dashboard for website performance by bringing together RUM data, Lighthouse insights, and regional testing. Users can gain a comprehensive understanding of their website's performance and implement Cloudflare recommendations based on this data with just a click of a button.</p>
    <div>
      <h3>Measuring performance in Cloudflare Observatory</h3>
      <a href="#measuring-performance-in-cloudflare-observatory">
        
      </a>
    </div>
    <p>We support the two main methods of testing website performance. These are synthetic tests and Real User Monitoring (RUM) tests.</p><p>Synthetic tests involve simulating user interactions and monitoring performance under controlled environments. These tests can provide valuable baseline measurements and help identify potential issues before deploying changes.</p><p>On the other hand, RUM tests involve collecting data directly from real users as they interact with the website, capturing their actual experiences in different environments and network conditions. RUM tests offer insights into the true end-user perspective. By combining both synthetic and RUM tests, website owners can gain a holistic view of performance, understanding how changes and optimizations affect both simulated and real user experiences.</p><p>Cloudflare Observatory combines both of these in one location. The integration of Google Lighthouse within the Observatory gives Cloudflare users a simple way to synthetically measure and understand their site's performance. Google Lighthouse measures several key performance metrics that impact user experience and search engine ranking. The generated report provides an overall performance score ranging from 1 (least performant) to 99 (most performant), making it easy for website owners to understand their site's performance.</p><p>Observatory offers a user-friendly interface that presents each Lighthouse metric in a traffic light system, indicating the result of the tested metric. One critical metric is Largest Contentful Paint (LCP), which measures a page's loading performance of the primary content. An optimal LCP score is less than 2.5 seconds, indicating satisfactory loading speed for the user. Through Observatory website owners can easily see their LCP score and other metrics. This allows them to optimize their site's performance and user experience. For example, by examining the LCP score website owners can identify opportunities for improvement and make informed decisions to enhance their site's performance.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2CKpAEY4qYUUeZZlSzU9vI/a9b75bff70a3df7eb9f681cbb9c19545/image3-8.png" />
            
            </figure>
    <div>
      <h3>New Smarter Recommendations</h3>
      <a href="#new-smarter-recommendations">
        
      </a>
    </div>
    <p>Recommendations from Observatory have become smarter by leveraging the insights gathered from Lighthouse and RUM testing. This enables us to precisely identify issues and offer tailored Cloudflare settings to enhance performance. For instance, when you receive a Lighthouse report it will highlight areas in which your website can be improved. In the provided report, several enhancements for image optimization are suggested. Cloudflare takes this feedback into account and provides product recommendations, such as enabling Polish or utilizing Image Resizing. This empowers our customers to enhance their performance score with just a single click.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/418KWP7ocQglmo86RZpkE8/4329761834d323aaf7c7fb95895864a9/image6-1.png" />
            
            </figure><p>Customers will have the convenience of viewing these recommendations within the Cloudflare dashboard, directly linked to the audit. The dashboard will encompass a wide range of Cloudflare features and functionalities, continually improving over time. With the addition of <a href="https://developers.cloudflare.com/cache/how-to/cache-rules/">Cache Rules</a> recommendations for uncached static content and a comprehensive testing suite, users will gain valuable insights into the benefits of implementing specific Cloudflare features before enabling them.</p><p>By knowing the performance impact of a product or feature before it is enabled, customers can make informed decisions and optimize their website's performance with confidence.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5j3LM6drOeEuJC8e8Iqgs/851762444a54a6e2f24c25afc96caf7a/image8.png" />
            
            </figure>
    <div>
      <h3>More tests, multiple regions and recurring tests</h3>
      <a href="#more-tests-multiple-regions-and-recurring-tests">
        
      </a>
    </div>
    <p>A significant piece of feedback we received from our old Speed Tab and beta testing was regarding the number and location of tests. We're thrilled to announce that we have addressed this feedback by increasing the number of tests allowed and enabling all plan types to schedule at least one recurring test, originating from a US region.</p><p>Customers on our Pro, Business, and Enterprise family of subscriptions can run tests from various regions to understand their site's performance in those areas. For instance, if a website is solely hosted in Iowa, USA, and a visitor is accessing it from Sydney, Australia, they will experience a slower page load due to the time it takes for an uncached file to be sent and rendered by the user's browser over a distance of 14,000 kilometers. By running tests from various regions, our customers can gain valuable insights into their website's performance and make informed decisions to optimize it for a better user experience - and an improved page load time.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ZL4HzJ47ltPfipLELBC7E/d94b77ffcf771fdf8d500285eec5a89a/Screenshot-2023-06-19-at-16.26.20.png" />
            
            </figure><p>The higher your plan type the more tests you are able to run and the more regions you are able to use. For example Pro customers can set up five recurring tests for their most important page from five different locations. These test runs will then be stored within the Observatory history tab allowing them to understand their Page Speed score from around the globe. Below is a table detailing the number of tests each plan type can run and the regions available to them.</p>
<table>
<thead>
  <tr>
    <th><span>Plan</span></th>
    <th><span>Ad-hoc tests</span></th>
    <th><span>Recurring tests</span></th>
    <th><span>Frequency of recurring tests</span></th>
    <th><span>Regions supported</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><span>Free</span></td>
    <td><span>5</span></td>
    <td><span>1</span></td>
    <td><span>Weekly</span></td>
    <td><span>Iowa, USA</span></td>
  </tr>
  <tr>
    <td><span>Pro</span></td>
    <td><span>10</span></td>
    <td><span>5</span></td>
    <td><span>Daily</span></td>
    <td><span>Everything in Free and</span><br /><span>South Carolina, USA</span><br /><span>North Virginia, USA</span><br /><span>Dallas, USA</span><br /><span>Oregon, USA</span><br /><span>Hamina, Finland</span><br /><span>Madrid, Spain</span><br /><span>St. Ghislain, Belgium</span><br /><span>Eemshaven, Netherlands</span><br /><span>Milan, Italy</span><br /><span>Paris, France</span><br /><span>Changhua County, Taiwan</span><br /><span>Tokyo, Japan</span><br /><span>Osaka, Japan</span><br /><span>Tel Aviv, Israel</span><br /><span>London, England</span><br /><span>Jurong West, Singapore</span><br /><span>Sydney, Australia</span><br /><span>Frankfurt, Germany</span><br /><span>Mumbai, India</span><br /><span>São Paulo, Brazil</span></td>
  </tr>
  <tr>
    <td><span>Business</span></td>
    <td><span>20</span></td>
    <td><span>10</span></td>
    <td><span>Daily</span></td>
  </tr>
  <tr>
    <td><span>Enterprise</span></td>
    <td><span>50</span></td>
    <td><span>15</span></td>
    <td><span>Daily</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h3>Incorporating RUM</h3>
      <a href="#incorporating-rum">
        
      </a>
    </div>
    <p>Cloudflare’s RUM service provides insights to a user's browser or devices, tracking metrics such as page load times, response times, and other user interactions. Cloudflare collects RUM data through its Browser Insights feature, which inserts a JavaScript "beacon" into HTML pages. This beacon sends information back to Cloudflare about the performance of a website from the perspective of real users, including metrics such as page load time, time to first byte, and other Web Vitals.</p><p>While you can always try a few page loads on your own laptop and see the results, gathering data from real users is the only way to take into account real-life device performance and network conditions.</p><p>Observatory now incorporates RUM data to match against your tested paths. This allows you to easily see how real users experience your site across the globe. This data is also dissected and located in the Observatory tab against your tested paths. Allowing you to view synthetic test data directly against Real User metrics.</p><p>Our RUM provider already incorporates the Interactive Next Paint (INP) Score. In 2022, Google announced <a href="https://web.dev/inp-cwv/">Interaction to Next Paint (INP)</a> as that new metric, promoting INP as the new <a href="https://www.cloudflare.com/learning/performance/what-are-core-web-vitals/">Core Web Vital</a> metric for responsiveness, replacing First Input Delay (FID). FID measures the delay between a user's first interaction with a web page and the browser's response to that interaction. INP measures the delay for any user interaction on a website, not just limited to the first input. This change reflects a more comprehensive approach to evaluating the responsiveness of a website.</p><p>If you don't have Web Analytics enabled on your Cloudflare zone then we will be unable to collect and display RUM data within Observatory. Enabling this feature is very simple and instructions can be found <a href="https://developers.cloudflare.com/analytics/web-analytics/getting-started/">here</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4aTKy40e8VaNBAXLJGjRSb/7c9937df4f561a9dff38d6b9db1175e1/image7-4.png" />
            
            </figure>
    <div>
      <h3>One click optimizations</h3>
      <a href="#one-click-optimizations">
        
      </a>
    </div>
    <p>Observatory now includes an enhanced Optimization layout, which introduces a one-click recommendations center. Enabling these features on your Cloudflare zone enhances optimization for the latest HTTP protocols, including <a href="/http3-the-past-present-and-future/">HTTP/3</a>. Additionally, Image Delivery is improved by converting PNGs and JPEGs to the efficient <a href="/a-very-webp-new-year-from-cloudflare/">WebP</a> format. Finally, Cloudflare performance tools are also enabled, allowing users to seamlessly implement new technologies such as <a href="/early-hints/">Early Hints</a>. These features are designed to contribute to improved website speed and overall performance.</p><p>As we release new features that we believe are beneficial to our customers, we will continue to add them to the One Click Optimizations. We have also made changes to the overall layout of the tab, splitting our products into subcategories to allow easy navigation to the individual performance products.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6M5b5hcYrZtmQttxTCsGDh/cb78425bfa8f0707e265aeedca1ba8ad/image4.jpg" />
            
            </figure>
    <div>
      <h3>Available now</h3>
      <a href="#available-now">
        
      </a>
    </div>
    <p>Observatory is available now! Become the Web Performance advocate in your organization by taking advantage of the Observatory features such as Google Lighthouse integration, RUM data, and multi-region testing, all available now. You will be able to gain valuable insights into your website's performance and make informed decisions to optimize and improve your site's performance.</p><p>In the coming months, we will continue expanding the Recommendations engine, introducing more products that empower you to continually enhance your website's performance. Additionally, we will provide the capability to simulate requests for specific features, giving you a comprehensive understanding of the real-world performance benefits before implementing them on your website.</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Speed]]></category>
            <guid isPermaLink="false">4MNXgFWK1zAm1CqJlGTl8U</guid>
            <dc:creator>Matt Bullock</dc:creator>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Are you measuring what matters? A fresh look at Time To First Byte]]></title>
            <link>https://blog.cloudflare.com/ttfb-is-not-what-it-used-to-be/</link>
            <pubDate>Tue, 20 Jun 2023 13:00:59 GMT</pubDate>
            <description><![CDATA[ Time To First Byte (TTFB) is not a good way to measure your websites performance. In this blog we’ll cover what TTFB is a good indicator of, what it's not great for, and what you should be using instead ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3DDRz6sPcW8kWs2Xw8iDv4/f99afbb10dad72d9d1f28855a71edb49/image1-18.png" />
            
            </figure><p>Today, we’re making the case for why Time To First Byte (TTFB) is not a good metric for evaluating how fast web pages load. There are better metrics out there that give a more accurate representation of how well a server or <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">content delivery network</a> performs for end users. In this blog, we’ll go over the ambiguity of measuring TTFB, touch on more meaningful metrics such as <a href="https://www.cloudflare.com/learning/performance/what-are-core-web-vitals/">Core Web Vitals</a> that should be used instead, and finish on scenarios where TTFB still makes sense to measure.</p><p>Many of our customers ask what the best way would be to evaluate how well a network like ours works. This is a good question! Measuring performance is difficult. It’s easy to simplify the question to “How close is Cloudflare to end users?” The predominant metric that’s been used to measure that is <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/">round trip time (RTT)</a>. This is the time it takes for one network packet to travel from an end user to Cloudflare and back. We measure this metric and mention it from time to time: Cloudflare has an average RTT of 50 milliseconds for 95% of the Internet-connected population.</p><p>Whilst RTT is a relatively good indicator of the quality of a network, it doesn’t necessarily tell you that much about how good it is at actually delivering actual websites to end users. For instance, what if the web server is really slow? A user might be very close to the data center that serves the traffic, but if it takes a long time to actually grab the asset from disk and serve it the result will still be a poor experience.</p><p>This is where TTFB comes in. It measures the time it takes between a request being sent from an end user until the very first byte of the response being received. This sounds great on paper! However it doesn’t capture how a webpage or web application loads, and what happens <i>after</i> the first byte is received.</p><p>In this blog we’ll cover what TTFB is a good indicator of, what it's not great for, and what you should be using instead.</p>
    <div>
      <h3>What is TTFB?</h3>
      <a href="#what-is-ttfb">
        
      </a>
    </div>
    <p>TTFB is a metric which reports the duration between sending the request from the client to a server for a given file, and the receipt of the first byte of said file. For example, if you were to download the Cloudflare logo from our website the TTFB would be how long it took to receive the first byte of that image. Similarly, if you were to measure the TTFB of a request to cloudflare.com the metric would return the TTFB of how long it took from request to receiving the first byte of the first HTTP response. Not how long it took for the image to be fully visible or for the web page to be loaded in a state that allowed a user to begin using it.</p><p>The simplest answer therefore is to look at the diametrically opposite measurement, Time to Last Byte (TTLB). TTLB, as you’d expect, measures how long it takes until the last byte of data is received from the server. For the Cloudflare logo file this would make sense, as until the image is fully downloaded it's not exactly useful. But what about for a webpage? Do you really need to wait until every single file is fully downloaded, even those images at the bottom of the page you can't immediately see? TTLB is fine for measuring how long it took to download a single file from a CDN / server. However for multi-faceted traffic, like web pages, it is too conservative, as it doesn’t tell you how long it took for the web page to be <i>usable.</i></p><p>As an analogy we can look at measuring how long it takes to process an incoming airplane full of passengers. What's important is to understand how long it takes for those passengers to disembark, pass through passport control, collect their baggage and leave the terminal, if no onward journeys. TTFB would measure success as how long it took to get the first passenger off of the airplane. TTLB would measure how long it took the last passenger to leave the terminal, even if this passenger remained in the terminal for hours afterwards due to passport issues or getting lost. Neither are a good measure of success for the airline.</p>
    <div>
      <h3>Why TTFB doesn't make sense</h3>
      <a href="#why-ttfb-doesnt-make-sense">
        
      </a>
    </div>
    <p>TTFB is a widely-used metric because it is easy-to-understand and it is a great signal for connection setup time, server time and network latency. It can help website owners identify when performance issues originate from their server. But is TTFB a good signal for how real users experience the loading speed of a web page in a browser?</p><p>When a web page loads in a browser, the user’s perception of speed isn’t related to the moment the browser first receives bytes of data. It is related to when the user starts to see the page rendering on the screen.</p><p>The loading of a web page in a browser is a very complex process. Almost all of this process happens after TTFB is reported. After the first byte has been received, the browser still has to load the main HTML file. It also has to load fonts, stylesheets, javascript, images and other resources. Often these resources link to other resources that also must be downloaded. Often these resources entirely block the rendering of the page. Alongside all these downloads, the browser is also parsing the HTML, CSS and JavaScript. It is building data structures that represent the content of the web page as well as how it is styled. All of this is in preparation to start rendering the final page onto the screen for the user.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5CEjRuDYe3eMAChrWxwmoC/29a7e28b2c9b961cb2bf0297edacffca/image2-12.png" />
            
            </figure><p>When the user starts seeing the web page actually rendered on the screen, TTFB has become a distant memory for the browser. For a metric that signals the loading speed as perceived by the user, TTFB falls dramatically short.</p><p>Receiving the first byte isn't sufficient to determine a good end user experience as most pages have additional render blocking resources that get loaded after the initial document request. Render-blocking resources are scripts, stylesheets, and HTML imports that prevent a web page from loading quickly. From a TTFB perspective it means the client could stop the ‘TTFB clock’ on receipt of the first byte of one of these files, but the web browser is blocked from showing anything to the user until the remaining critical assets are downloaded.</p><p>This is because browsers need instructions for what to render and what resources need to be fetched to complete “painting” a given web page. These instructions come from a server response. But the servers sending these responses often need time to compile these resources — this is known as “server think time.” While the servers are busy during this time… browsers sit idle and wait. And the TTFB counter goes up.</p><p>There have been a number of attempts over the years to benefit from this “think time”. First came Server Push, which was superseded last year by <b>Early Hints</b>. Early Hints take advantage of “server think time” to asynchronously send instructions to the browser to begin loading resources while the origin server is compiling the full response. By sending these hints to a browser before the full response is prepared, the browser can figure out what it needs to do to load the webpage faster for the end user. It also stops the TTFB clock, meaning a lower TTFB. This helps ensure the browser gets the critical files sooner to begin loading the webpage, and it also means the first byte is delivered sooner as there is no waiting on the server for the whole dataset to be prepared and ready to send. Even with Early Hints, though, TTFB doesn’t accurately define how long it took the web page to be in a usable state.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5HWEDVlv82i1e7QA4M9MHO/f7847d5bc8b344c6f2131ed9451ece9c/image3-10.png" />
            
            </figure><p>TTFB also does not take into account multiplexing benefits of <a href="https://www.cloudflare.com/learning/performance/http2-vs-http1.1/">HTTP/2</a> and <a href="https://www.cloudflare.com/learning/performance/what-is-http3/">HTTP/3</a> which allow browsers to load files in parallel. It also doesn't take into account compression on the origin, which would result in a higher TTFB but a quicker page load overall due to the time the server took to compress the assets and send them in a small format over the network.</p><p>Cloudflare offers many features that can improve the loading speed of a website, but don’t necessarily impact the TTFB score. These features include Zaraz, Rocket Loader, HTTP/2 and HTTP/3 Prioritization, Mirage, Polish, Image Resizing, Auto Minify and Cache. These features <a href="https://www.cloudflare.com/learning/performance/speed-up-a-website/">improve the loading time of a webpage</a>, ensuring they load optimally through a series of enhancements from <a href="https://www.cloudflare.com/developer-platform/cloudflare-images/">image optimization and compression</a> to render blocking elimination by optimizing the sending of assets from the server to the browser in the best possible order.</p><p>More comprehensive metrics are required to illustrate the full loading process of a web page, and the benefit provided by these features. This is where <b>Real User Monitoring</b> helps.  At Cloudflare we are all-in on Real User Monitoring (RUM) as the future of <a href="https://www.cloudflare.com/learning/performance/why-site-speed-matters/">website performance</a>. We’re investing heavily in it: both from an observation point of view and from an optimization one also.</p><p>For those unfamiliar with RUM, we typically optimize websites for three main metrics - known as the “Core Web Vitals”. This is a set of key metrics which are believed to be the best and most accurate representation of a poorly performing website vs a well performing one. These key metrics are Largest Contentful Paint, First Input Delay and Cumulative Layout Shift.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5sWYD1VyB6OkS1avUesrta/d6ddf78c645c6175987cbbaf1df9a029/image4-10.png" />
            
            </figure><p>Source: <a href="https://addyosmani.com/blog/web-vitals-extension/">https://addyosmani.com/blog/web-vitals-extension/</a> </p><p>LCP measures loading performance; typically how long it takes to load the largest image or text block visible in the browser. FID measures interactivity. For example, the time between when a user clicks or taps on a button to when the browser responds and starts doing something. Finally, CLS measures visual stability. A good, or bad example of CLS is when you go to a website on your mobile phone, tap on a link and the page moves at the last second meaning you tap something you didn't want to. That would be a lower CLS score as its poor user experience.</p><p>Looking at these metrics gives us a good idea of how the end user is truly experiencing your website (RUM) vs. how quickly the first byte of the file was retrieved from the nearest Cloudflare data center (TTFB).</p>
    <div>
      <h3>Good TTFB, bad user experience</h3>
      <a href="#good-ttfb-bad-user-experience">
        
      </a>
    </div>
    <p>One of the “sub parts” that comprise LCP is TTFB. That means a poor TTFB is very likely to result in a poor LCP. If it takes you 20 seconds to retrieve the first byte of the first image, your user isn't going to have a good experience - regardless of your outlook on TTFB vs RUM.</p><p>Conversely, we found that a <a href="https://web.dev/ttfb/#what-is-a-good-ttfb-score">good TTFB</a> does not always mean a good LCP score, or FID or CLS. We ran a query to collect RUM metrics of web pages we served which had a good TTFB score. Good is defined as a TTFB as less than 800ms. This allowed us to ask the question: TTFB says these websites are good. Does the RUM data support that?</p><p>We took four distinct samples from our RUM data in June. Each sample had a different date-range and sample-rate combination. In each sample we queried for 200,000 page views. From these 200,000 page views we filtered for only the page views that reported a 'Good' TTFB. Across the samples, of all page views that have a good TTFB, about 21% of them did not have a <a href="https://web.dev/lcp/#what-is-a-good-lcp-score">“good” LCP score</a>. 46% of them did not have a <a href="https://web.dev/fid/#what-is-a-good-fid-score">“good” FID score</a>. And 57% of them did not have a good <a href="https://web.dev/cls/#what-is-a-good-cls-score">CLS</a> score.</p><p>This clearly shows the disparity between measuring the time it takes to receive the first byte of traffic, vs the time it takes for a webpage to become stable and interactive. In summary, LCP includes TTFB but also includes other parts of the loading experience. LCP is a more comprehensive, user-centric metric.</p>
    <div>
      <h3>TTFB is not all bad</h3>
      <a href="#ttfb-is-not-all-bad">
        
      </a>
    </div>
    <p>Reading this post and others from Speed Week 2023 you may conclude we really don't like TTFB and you should stop using it. That isn't the case.</p><p>There are a few situations where TTFB does matter. For starters, there are many applications that aren’t websites. File servers, APIs and all sorts of streaming protocols don’t have the same semantics as web pages and the best way to objectively measure performance is to in fact look at exactly when the first byte is returned from a server.</p><p>To help optimize TTFB for these scenarios we are announcing <a href="/introducing-timing-insights">Timing Insights</a>, a new analytics tool to help you understand what is contributing to "Time to First Byte" (TTFB) of Cloudflare and your origin. Timing Insights breaks down TTFB from the perspective of our servers to help you understand what is slow, so that you can begin addressing it.</p>
    <div>
      <h3>Get started with RUM today</h3>
      <a href="#get-started-with-rum-today">
        
      </a>
    </div>
    <p>To help you understand the real user experience of your website we have today launched <a href="/cloudflare-observatory-generally-available"><b>Cloudflare Observatory</b></a> <b>-</b> the new home of performance at Cloudflare.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1UbKEuzHKLSwcjmGfQIrfW/bcbbdb8272fbbbdf17a7f5238fad0812/image5-2-1.png" />
            
            </figure><p>Cloudflare users can now easily <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">monitor website performance</a> using Real User Monitoring (RUM) data along with scheduled synthetic tests from different regions in a single dashboard. This will identify any performance issues your website may have. The best bit? Once we’ve identified any issues, Observatory will highlight customized recommendations to resolve these issues, all with a single click.</p><p>Start making your website faster today with <a href="https://dash.cloudflare.com/?to=/:account/:zone/speed/test">Observatory</a>.</p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[TTFB]]></category>
            <category><![CDATA[Performance]]></category>
            <guid isPermaLink="false">1ckVp4U6xrlEipotlKstbo</guid>
            <dc:creator>Sam Marsh</dc:creator>
            <dc:creator>Achiel van der Mandele</dc:creator>
            <dc:creator>Shih-Chiang Chien</dc:creator>
        </item>
        <item>
            <title><![CDATA[How to use Cloudflare Observatory for performance experiments]]></title>
            <link>https://blog.cloudflare.com/performance-experiments-with-cloudflare/</link>
            <pubDate>Tue, 20 Jun 2023 13:00:41 GMT</pubDate>
            <description><![CDATA[ Introducing Cloudflare's Performance Experiments in Observatory: Safely test code, improve website speed, and minimize risk ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/10lkfVC0CItfHg3o9li9UE/c76d37c253df38abe5d330f69cfbda21/image1-12.png" />
            
            </figure><p>Website performance is crucial to the success of online businesses. <a href="https://www2.deloitte.com/content/dam/Deloitte/ie/Documents/Consulting/Milliseconds_Make_Millions_report.pdf">Stud</a>y after <a href="https://www.thinkwithgoogle.com/_qs/documents/4290/c676a_Google_MobileSiteSpeed_Playbook_v2.1_digital_4JWkGQT.pdf">study</a> has shown that an increased load time directly affects sales. But how do you get test products that could improve your website speed without incurring an element of risk?</p><p>In today's digital landscape, it is easy to find code optimizations on the Internet including our own <a href="https://developers.cloudflare.com/workers/examples/103-early-hints/">developers documentation</a> to improve the performance of your website or web applications. However, implementing these changes without knowing the impact they’ll have can be daunting. It could also cause an outage, taking websites or applications offline entirely, leaving admins scrambling to remove the offending code and get the business back online.</p><p>Users need a way to see the impact of these improvements on their websites without impacting uptime. They want to understand “If I enabled this, what performance boost should I expect to get?”.</p><p>Today, we are excited to announce Performance Experiments in Cloudflare Observatory. Performance Experiments gives users a safe place to experiment and determine what the best setup is to improve their website performance before pushing it live for all visitors to benefit from. Cloudflare users will be able to simply enter the desired code, run our Observatory testing suite and view the impact it would have on their Lighthouse score. If they are satisfied with the results they can push the experiment live. With the click of a button.</p>
    <div>
      <h3>Experimenting within Observatory</h3>
      <a href="#experimenting-within-observatory">
        
      </a>
    </div>
    <p>Cloudflare Observatory, announced today, allows users to <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">easily  monitor website performance</a> by integrating Real-User Monitoring (RUM) data and synthetic tests in one location.. This allows users to easily identify areas for optimization and leverage Cloudflare's features to address performance issues.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3aQGCB2KNhkS4HWeEiyniP/b88844566de492c58b2280afd56dd71b/Untitled-presentation--3-.png" />
            
            </figure><p>Observatory's recommendations leverage insights from these Lighthouse test and RUM data, enabling precise identification of issues and offering tailored Cloudflare settings for enhanced performance. For example, when a Lighthouse report suggests image optimization improvements, Cloudflare recommends enabling Polish or utilizing Image Resizing. These recommendations can be implemented with a single click, allowing customers to boost their performance score effortlessly.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3rwkPP32qk8u5cvYWSwWhh/407bbe9e5fe3874fb34beafd0c566bdc/image2-11.png" />
            
            </figure>
    <div>
      <h3>Fine tuning with Experiments</h3>
      <a href="#fine-tuning-with-experiments">
        
      </a>
    </div>
    <p>Cloudflare’s Observatory allows customers to easily enable recommended Cloudflare settings. However,  through the medium of Cloudflare Workers web performance advocates have been able to create and share JavaScript examples of how to improve and optimize a website.</p><p>A great example of this is <a href="/fast-google-fonts-with-cloudflare-workers/">Fast Fonts</a>. Google Fonts are slow due to how they are served. When using Google Fonts on your website, you include a stylesheet URL that contains the font styles you want to use. The CSS file is hosted on one domain (fonts.googleapis.com), while the font files are on another domain (fonts.gstatic.com). This separation means that each resource requires at least four round trips to the server for DNS lookup, establishing the socket connection, negotiating TLS encryption (for https), and making the request itself.</p><p>These requests cannot be done in parallel because the fonts are not known until after the CSS is downloaded and applied to the page. In the best-case scenario, this leads to eight round trips before the text can be displayed. On a slower 3G connection with a 300ms round-trip time, this delay can add up to 2.4 seconds. To fix this issue Cloudflare Workers can be used to reduce the performance penalties of serving Google Fonts directly from Google by 81%.</p><p>Another issue is resource prioritization. When all requests come from the same domain on the same HTTP/2 connection, critical resources like CSS and fonts can be prioritized and delivered before lower priority resources like images. However, since Google Fonts (and most third-party resources) are served from a different domain than the main page resources, they cannot be prioritized and end up competing with each other for download bandwidth. This competition can result in significantly longer fetch times than the best-case scenario of eight round trips.</p><p>To implement this Worker first create a Cloudflare Worker, implement the code from the <a href="https://github.com/cloudflare/workers-sdk/tree/main/templates">GitHub repository</a> using Wrangler and then run manual tests to see if performance has been improved and that there are no issues or problems with the website loading. Users can choose to implement the Cloudflare Worker on a test path that may not be a true reflection of production or complicate the Cloudflare Worker further by implementing an <a href="https://developers.cloudflare.com/workers/examples/ab-testing/">A/B test</a> that could still have an impact on your end users. So how can users test code on their website to easily see if the code will improve the performance of their website and not have any adverse impact on end users?</p>
    <div>
      <h3>Introducing Performance Experiments</h3>
      <a href="#introducing-performance-experiments">
        
      </a>
    </div>
    <p>Last year we announced <a href="/snippets-announcement/">Cloudflare Snippets</a>. Snippets is a platform for running discrete pieces of JavaScript code on Cloudflare before your website is served to the user. They provide a convenient way to customize and enhance your website's functionality. If you are already familiar with Cloudflare Workers, our developer platform, you'll find Snippets to be a familiar and welcome addition to your toolkit. With Snippets, you can easily execute small pieces of user-created JavaScript code to modify the behavior of your website and improve performance, security, and user experience.</p><p>Combining Snippets with Observatory lets users easily run experiments and get instant feedback on the performance impact. Users will be able to find a piece of JavaScript, insert it into the Experiments window and hit test. Observatory will then automatically run multiple Lighthouse tests with the experiment disabled and then enabled. The results will show the before and after scores allowing users to determine the impact of the experiment e.g. “If I put this JavaScript on my website, my Lighthouse score would improve by 15 points”.</p><p>This allows users to understand if the JavaScript has had a positive performance impact on their website. Users can then deploy this JavaScript, via Snippets, against all requests or on a specific subset of traffic. For example, if I only wanted it run on traffic from the UK or my office IPs I would use the rule below:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4sf0uU0mxbzy0vpooRtD1I/4dc83c8d9099e1a819c63bbf600e34ca/image3-9.png" />
            
            </figure><p>Alternatively, if the results impact performance customers negatively users can safely discard the experiment or try another example. All without real visitors to the website being impacted or ever at risk.</p>
    <div>
      <h3>Accessing Performance Experiments</h3>
      <a href="#accessing-performance-experiments">
        
      </a>
    </div>
    <p>Performance Experiments are currently under development — you can sign up <a href="https://www.cloudflare.com/lp/performance-experiments/">here</a> to join the waitlist for access.</p><p>We hope to begin admitting users later in the year, with an open beta to follow.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Snippets]]></category>
            <category><![CDATA[Performance]]></category>
            <guid isPermaLink="false">5pLrwEWCzaYn7Eidb2mu5H</guid>
            <dc:creator>Matt Bullock</dc:creator>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Welcome to Speed Week 2023]]></title>
            <link>https://blog.cloudflare.com/welcome-to-speed-week-2023/</link>
            <pubDate>Sun, 18 Jun 2023 17:00:40 GMT</pubDate>
            <description><![CDATA[ This week we will help you measure what matters. We’ll help you gain insight into your performance, from Zero Trust and API’s to websites and applications. And finally we’ll help you get faster. Quickly ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/hIjlYUV0oiHkvLU7BPDwE/9081023429a9851730f99e14b484d4f8/image2-3.png" />
            
            </figure><p>What we consider ‘fast’ is changing. In just over a century we’ve cut the <a href="https://www.independent.co.uk/travel/news-and-advice/uk-australia-flight-time-travel-100-years-change-london-perth-direct-a8268311.html">time</a> taken to travel to the other side of the world from 28 days to 17 hours. We developed a vaccine for a virus causing a global pandemic in just <a href="https://wellcome.org/news/quick-safe-covid-vaccine-development">one year</a> - 10% of the typical time. <a href="https://www.cloudflare.com/learning/ai/what-is-artificial-intelligence/">AI</a> has reduced the time taken to complete software development tasks by <a href="https://github.blog/2022-09-07-research-quantifying-github-copilots-impact-on-developer-productivity-and-happiness/">55%</a>. As a society, we are driven by metrics - and the need to beat what existed before.</p><p>At Cloudflare we don't focus on metrics of days gone by. We’re not aiming for “faster horses”. Instead we are driven by questions such as “What does it actually look like for users?”, “How is this actually speeding up the Internet?”, and “How does this make the customer faster?”.</p><p>This innovation week we are helping users measure what matters. We will cover a range of topics including how we are fastest at Zero Trust, have the fastest network and a deep dive on cache purge and why global purge latency mightn’t be the gold star it's made out to be. We’ll also cover why Time to First Byte is generally a bad measurement. And what you should care about instead.</p><p>Woven amongst these topics are a number of great new products and features that genuinely make you and your customers faster. From API acceleration and end-to-end Brotli 11 compression, to reducing page load times by 30% with one-click. Plus a brand new home for application performance.</p><p>This week we will help you measure what matters. We’ll help you gain insight into your performance, from <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">Zero Trust</a> and APIs to websites and applications. And finally we’ll help you get faster. Quickly.</p><p>We are proving we are the fastest at what we do. And we are making it as easy as possible for our users to attain those numbers.</p><p>Welcome to Speed Week.</p>
    <div>
      <h3>More megapixels?</h3>
      <a href="#more-megapixels">
        
      </a>
    </div>
    <p>You don't have to go far in the real world to find examples of highly-touted metrics that likely don't capture what you really care about.</p><p>If you read the announcements each year you’d be forgiven for believing smartphones have devolved into cameras with apps and an antenna. With each new model announced the press releases reference megapixel improvements between the previous and latest model.</p><p>The number of megapixels alone does not guarantee better image quality. Factors such as sensor size, lens quality, image processing algorithms, and low-light performance also play significant roles in determining the overall camera performance. This has been a widely accepted view for over a <a href="https://www.scientificamerican.com/article/camera-megapixels-why-more-isnt-alw-2012-05/">decade now</a>, so why do companies keep pushing it as a metric - and why do users feel it's important?</p><p>Similarly, marketing collateral from Internet Service Providers would have you believe that “bandwidth is king”.</p><p>However it has been categorically proven that <a href="/making-home-internet-faster/">bandwidth is not the sole indicator of speed</a>. Just two months ago we published a blog on “Making home Internet faster has little to do with speed”, concluding “While bandwidth plays a part, the latency of the connection – the real Internet “speed” – is more important_<b>”</b>_. The post references a recent paper by two researchers from MIT which supports this point, showing the point of diminishing returns is around 20Mbps for when more bandwidth doesn't mean a webpage loads much faster.</p><p>Again, the advertised, and generally accepted comparison metric amongst consumers, is incorrect. More bandwidth does not equal faster Internet speeds.</p><p>Simply put - are you really measuring what matters to you when reviewing your product choices and vendors? Or on reflection have your choices been influenced by dogma for far too long?</p>
    <div>
      <h3>Measuring what matters on the Internet</h3>
      <a href="#measuring-what-matters-on-the-internet">
        
      </a>
    </div>
    <p>Similarly to the smartphone and ISP industries, we at Cloudflare operate in industries where users often compare us against competitors using metrics that likely don't measure what matters to them.</p><p>Large enterprises use software to selectively shift traffic between Content Delivery Networks (CDNs) based on the lowest possible Time to First Byte (TTFB) score per region. This means if Cloudflare suddenly were to cut its TTFB in half in Africa, for example, we could see a huge influx of traffic in this region from these enterprise customers - likely not doing anything to improve the actual visitor experience of a website.</p><p>TTFB is often used as a measure of how quickly a web server responds to a request and common web testing services report it. The faster it is the better the web server (in theory). We have known for <a href="/ttfb-time-to-first-byte-considered-meaningles/">years</a>, however, that TTFB is not on its own a fair reflection of real world performance.</p><p>Receiving the first byte isn't sufficient to determine a good end user experience as most pages have additional render blocking resources that get loaded after the initial document request. TTFB does not take into account multiplexing benefits of HTTP/2 and HTTP/3 which allow browsers to load files in parallel. It also doesn't account for features like <a href="https://developers.cloudflare.com/cache/advanced-configuration/early-hints/">Early Hints</a>, <a href="https://www.cloudflare.com/products/zaraz/">Zaraz</a>, <a href="https://developers.cloudflare.com/fundamentals/speed/rocket-loader/">Rocket Loader</a>, <a href="/better-http-2-prioritization-for-a-faster-web/">HTTP/2</a> and soon HTTP/3 Prioritization which eliminate render blocking.</p><p>As Sitespect wrote <a href="https://www.sitespect.com/ttfb-is-not-the-best-indicator-of-site-speed/">last year</a>, “<i>TTFB is a measure of how fast a web server is able to respond to a request, and how long it takes for that request to traverse various layers of networking to reach a user’s browser. It is a measure of speed for delivery of content, but it is not a measurement for how long end-users are effectively waiting before they can start interacting with your website. TTFB completely ignores everything that happens after that network layer: loading, downloading of resources, rendering, etc. In other words, TTFB is not a user-centric measurement, it’s a networking measurement.</i>”.</p><p>At Cloudflare we are all-in on <b>Real User Monitoring (RUM)</b> as the future of website performance. We’re investing heavily in it - both from an observation point of view and from an optimization one also. This week we will be releasing a series of new products aimed at helping users understand the actual experience of their end users (i.e. website visitors), and provide suggestions on how to improve it.</p><p>For those unfamiliar with RUM, we typically optimize websites for three main metrics - known as the “Core Web Vitals”. This is a set of key metrics which are believed to be the best and most accurate representation of a poorly performing website vs a well performing one. These key metrics are <i>Largest Contentful Paint, First Input Delay and Cumulative Layout Shift.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/66g3R1QaW4F8fVgpwqhx6N/4b035620185c026fc8f0f1f0a1244838/image1-3.png" />
            
            </figure><p>Credit: <a href="https://addyosmani.com/blog/web-vitals-extension/">https://addyosmani.com/blog/web-vitals-extension/</a></p><p>LCP measures loading performance; typically how long it takes to load the largest image or text block visible in the browser. FID measures interactivity. For example, the time between when a user clicks or taps on a button to when the browser responds and starts doing something. Finally, CLS measures visual stability. A good, or bad example of CLS is when you go to a website on your mobile phone, tap on a link and the page moves at the last second meaning you tap something you didn't want to. That would be a lower CLS score as its poor user experience.</p><p>Looking at these metrics gives us a good idea of how the end user is truly experiencing your website (RUM) vs. how quickly the nearest Cloudflare data center begins to return data (TTFB).</p><p>The other benefit of Real User Monitoring is it includes the speed advantage of new protocols and features designed to improve the customer experience. For example, Time to First Byte is a single connection between the client and the nearest Cloudflare server. This is nothing like how a web browser connects to a website, which uses multiplexing to fetch multiple files at the same time in parallel. There are also products like Early Hints which are designed to take advantage of the “server think time” to send instructions to the browser to begin loading readily-available resources while the server finishes compiling the full response.</p><p>In Speed Week we will be going deep into why TTFB is a bad metric to care about for websites and web applications, why RUM is the future, and a blog post on the latest Core Web Vital - “Interaction to Next Paint” (INP), and what it means to you as a business.</p><p>We will also be unveiling a brand-new product which will be the new home of application performance on Cloudflare. The new product will augment synthetic tests from various global locations with <a href="https://www.cloudflare.com/application-services/solutions/app-performance-monitoring/">real user monitoring data</a> to give administrators the best possible understanding of how their website is performing <i>in the real world.</i> This product will be available for all plan levels.</p>
    <div>
      <h3>We’re the fastest, and we can prove it</h3>
      <a href="#were-the-fastest-and-we-can-prove-it">
        
      </a>
    </div>
    <p>It's no secret that Cloudflare is fast.</p><p>However it might not be obvious to the everyday reader just how fast we are, and in just how many areas.  Fastest <a href="/network-performance-update-developer-week/">compute</a>. Fastest <a href="https://www.dnsperf.com/#!dns-providers">DNS</a>. Fastest <a href="/network-performance-update-developer-week/">network</a>. Fastest <a href="/network-performance-update-security-week-2023/">Zero Trust Network Access (ZTNA)</a>. Fastest Secure Web Gateway (SWG). Fastest o<a href="https://www.cloudflare.com/learning/cloud/what-is-object-storage/">bject storage</a>. And we’re finding areas we are not empirically the fastest and looking to prove we are number one.</p><p>We’re also finding ways to migrate customers from legacy providers and applications to Cloudflare as fast as possible. These legacy vendors have locked in companies using confusing terminology and esoteric features, trapping them on sub-par products and making them too afraid to move away. We’re helping those customers escape. <a href="/r2-super-slurper-ga/">Super Slurper</a> helps customers move away from S3, Turpentine helps migrate legacy VCL setups to Cloudflare, and our <a href="/descaler-program/">Descaler program</a> helps to migrate customers from Zscaler to Cloudflare in a matter of hours. We are building tools and products to help those customers who want to move to the fastest network but are locked in.</p><p>In Speed Week we’ll cover the latest on these programs and how we are relentlessly pushing to make the migration process as quick and easy as possible for customers who want to move to Cloudflare and put their business on the fastest network around.</p>
    <div>
      <h3>Performance matters, whatever the product area</h3>
      <a href="#performance-matters-whatever-the-product-area">
        
      </a>
    </div>
    <p>Generally when you hear of performance improvements it's typically through the lens making websites faster. But speed comes in many forms. Take Zero Trust as an example.</p><p>Measuring Zero Trust performance matters because it impacts your employees' experience and their ability to get their job done. Whether it’s accessing services through access control products, connecting out to the public Internet through a Secure Web Gateway, or securing risky external sites through Remote Browser Isolation, all of these experiences need to be frictionless. But what if your company's Secure Web Gateway is in London and you are in Johannesburg? This can mean a painful, slow, and frustrating employee experience whilst they wait for traffic to be sent to and from London. Slack becomes slow. Zoom becomes slow. Employees become frustrated.</p><p>The bigger concern, however, is not knowing of these performance issues. For example, if each of your employees are physically located in an office and the connection to critical business systems like Salesforce or Workday worsens, the likelihood is it will become evident quickly. But what about in a remote workforce with employees globally distributed? As a business, you need the ability to understand how your employees are experiencing critical business systems and identify any connection and performance issues they may be experiencing to ensure they get addressed quickly. In Speed Week we’ll unveil our latest Zero Trust offering which will give CIOs and businesses incredible insight into the performance experience of their workforce.</p><p>Speed Week will show Cloudflare is the fastest Zero Trust provider. Our analysis will provide updated benchmark comparisons and include additional competitors to show how we outperform everyone to give employees the fastest Zero Trust experience.</p><p>Another area we will shine a spotlight on this week is <i>cache purge</i>. When you think of CDNs it's common to look at them as a large distributed cache. Visitor-requested files are retrieved from an origin and stored on globally distributed CDN servers. This allows visitors to download the file in the quickest possible time by retrieving it from their nearest Cloudflare data center rather than having to traverse the Internet to and from the origin. TTFB will measure the time taken to receive a single file from the nearest location. RUM will measure the time it takes to receive multiple files, cached and uncached, and put them together into the webpage requested. But what about when the file changes on origin?</p><p>In the scenario where a business is hosting a pricebook as a downloadable file on its website, it is very important to understand how long it takes to remove old copies from Cloudflare cache to ensure customers don't see incorrect prices. This is where measuring <i>cache purge times</i> becomes important. The time taken to remove the invalidated file (old file) from every server in every data center in the CDN is known as the ‘global purge time’. In Speed Week we will explain how we have built our new cache purge architecture to be lightning-fast and what the performance numbers are as a result (spoiler: they are insanely fast).</p><p>These are just a few examples of what we have in store for the week. We also have blogs on AI, API acceleration, developer platform, networking, protocols, compression, streaming, UI optimization and more.</p>
    <div>
      <h3>Speed at the heart of Cloudflare</h3>
      <a href="#speed-at-the-heart-of-cloudflare">
        
      </a>
    </div>
    <p>At Cloudflare we put performance at the heart of everything we do.</p><p>Make sure to follow the Cloudflare blog and social media accounts for all of the week's news, and join us on Cloudflare TV each day for a live discussion of the day's announcements.</p><p>Welcome to Speed Week.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div><p></p> ]]></content:encoded>
            <category><![CDATA[Speed Week]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">54vXpUAi08KLT7ihBbqJB0</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[The most programmable Supercloud with Cloudflare Snippets]]></title>
            <link>https://blog.cloudflare.com/snippets-announcement/</link>
            <pubDate>Thu, 17 Nov 2022 14:00:00 GMT</pubDate>
            <description><![CDATA[ Today we are announcing Cloudflare Snippets. Snippets are a simple way of executing a small piece of Javascript on select HTTP requests, using the ruleset engine filtering logic. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1OJBcvw1RLIv4SmqBQoDVE/12f4e3f81b9aff4ecc7a62c7017c98c2/image3-28.png" />
            
            </figure>
    <div>
      <h2>Your traffic, how you like it</h2>
      <a href="#your-traffic-how-you-like-it">
        
      </a>
    </div>
    <p>Cloudflare is used by a highly diverse customer base. We offer simple-to-use products for everything from setting HTTP headers to rewriting the URI path and performing URL redirects. Sometimes customers need more than the out-of-the-box functionality, not just adding an HTTP header - but performing some advanced calculation to create the output. Today they would need to create a feature request and wait for it to be shipped, write a <a href="https://workers.cloudflare.com/">Cloudflare Worker</a>, or keep this modification ‘on origin’ - on their own infrastructure.</p><p>To simplify this, we are delighted to announce Cloudflare Snippets. Snippets are a new way to perform traffic modifications that users either cannot do via our productised offerings, or want to do programmatically. The best part? The vast majority of customers will pay <i>nothing extra</i> for using Snippets.</p><p>Users now have a choice. Perform the action via a rule. Or, if more functionality is needed, write a Snippet.  Neither will mean waiting. Neither will incur additional cost (although a high fair usage cap will apply). Snippets unblocks users to do what they want, when they want. All on Cloudflare.</p><p>Snippets will support the import of code written in various languages, such as JavaScript (modern), VCL (legacy) and Apache .htaccess files (legacy). This allows customers to migrate legacy operational code onto our platform - whilst also consolidating their JavaScript operations.</p><p>Please use the sign-up form to join the waitlist for Snippets if you are interested in testing. We hope to begin admitting users into the closed beta early 2023.</p>
    <div>
      <h2>Why build Snippets?</h2>
      <a href="#why-build-snippets">
        
      </a>
    </div>
    <p>Over the past 18 months we have released a number of new rules products such as <a href="/introducing-transform-rules-with-url-rewriting-at-the-edge/">Transform Rules,</a> <a href="/introducing-cache-rules/">Cache Rules</a>, <a href="/origin-rules/">Origin Rules</a>, <a href="/configuration-rules/">Config Rules</a> and <a href="/dynamic-redirect-rules/">Redirect Rules</a>. These new products give more control to customers on how we process their traffic as it flows through our global network. The feedback on these products so far has been overwhelmingly positive. However, our customers still occasionally need the ability to do more than the out-of-the-box functionality allows.</p><p>There are always some use cases where a product doesn’t provide the functionality that a customer needs for their specific situation.  For example, whilst thousands of our customers are now using Transform Rules to solve their HTTP header modification use cases, there remains a small number of use cases that are not possible, such as setting dynamic expiry times with cookies or hashing tokens with a key.</p><p>This is where Cloudflare Snippets help. Customers will no longer need to use the full Cloudflare Workers platform to implement these relatively simple use cases. Nor will they need to wait for us to build their feature requests. Instead, they will be able to run a Snippet of JavaScript.</p>
    <div>
      <h2>Migrating legacy code to Snippets</h2>
      <a href="#migrating-legacy-code-to-snippets">
        
      </a>
    </div>
    <p><a href="https://varnish-cache.org/docs/trunk/users-guide/vcl.html">Varnish Control Language</a> (VCL) is only used within the context of Varnish. Launched around 16 years ago, it has historically been used to configure traffic and routing for <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">Content Delivery Networks</a> as it was extensible to a wide range of use cases.</p><p>There are still a good number of businesses out there using VCL to perform routing and traffic modification actions. Whilst other providers are deprecating support for VCL, we want to make sure those of you comfortable using it are still supported.</p><p>Snippets won't run pure VCL. Instead, we will convert VCL into easy to maintain rules or Snippets. To achieve this we’re building a simple-to-use, self-serve VCL converter that analyzes uploaded VCL code and auto-generates suggested Snippets, and if we can find a match, also generates suggested rules for products such as Transform Rules or Cache Rules.</p><p>This topic was initially handled via <a href="/announcing-turpentine/">Project Turpentine</a>, a suite of tools used by Cloudflare employees to parse a customer’s VCL into a suggested JavaScript configuration. This JavaScript could then be loaded into a Worker, or series of Workers.</p><p>Snippets takes the idea and principles of Turpentine further. Much further. By building a parser directly in the dashboard it puts the power directly into the hands of users and gives them a choice. You can tell us to migrate everything we can into Rules with the remaining code migrated into Snippets, or, you can choose to tell us to migrate everything into discrete Snippets. It's your call.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7783datzERcQclqZ8Ey84u/12736fcb80fffecbdb6a73f7053e9deb/image1-55.png" />
            
            </figure><p>We’ll give Apache <a href="https://developer.mozilla.org/en-US/docs/Learn/Server-side/Apache_Configuration_htaccess">htaccess</a> and NGINX <a href="https://www.nginx.com/resources/wiki/start/topics/examples/full/">configuration files</a> the same treatment. The goal being users simply upload the files from their websites Apache or NGINX configuration, and we generate suggested Snippets and/or rules.</p><p>The days of having to use legacy code for operational tasks are coming to an end. Snippets allow users to migrate these workloads to Cloudflare, and let them focus on the bigger problems of the business vs maintaining legacy systems.</p>
    <div>
      <h2>The difference between Snippets and Workers</h2>
      <a href="#the-difference-between-snippets-and-workers">
        
      </a>
    </div>
    <p>Most readers will already be familiar with Cloudflare Workers, our powerful developer platform which allows businesses to run and build entire products and solutions on Cloudflare's global network. Snippets is also built on this platform, but has a few key differences.</p><p>The first major difference is that a Snippet will run as part of the <a href="https://developers.cloudflare.com/ruleset-engine/">Ruleset Engine</a> as dedicated new <i>phases</i>, similar to Transform Rules and Cache Rules. Customers will be able to select and execute a Snippet based on any <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">ruleset engine filter</a>. This allows customers to run a Snippet against every request, or filter for specific HTTP traffic based on the fields we offer, such as traffic with a certain bot score, originating from a specific country, or with a specific cookie. Snippets will be additive, meaning users can have one Snippet to add an HTTP header, and another to rewrite the URL, and both will execute if they match:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1RAJyoslLJf0Q7yiGjqTiD/1b0b09e884088b571e513fd8225e8892/image2-39.png" />
            
            </figure><p>Another major difference - Cloudflare Snippets are available for all plan levels, at no additional cost. 99% of users won't pay a single cent, ever, to use this solution. This allows customers to migrate their simple workloads from legacy solutions like VCL to the Cloudflare platform, and actively reduce their monthly spend.</p><table>
<thead>
  <tr>
    <th></th>
    <th>Free Plans</th>
    <th>Pro Plans</th>
    <th> Business Plans</th>
    <th>Enterprise Plans</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Snippets available</td>
    <td>5 Snippets per zone.</td>
    <td>20 Snippets per zone.</td>
    <td>50 Snippets per zone.</td>
    <td>200 Snippets per zone*<br />(Customers can speak with their Customer Success team to have this increased).</td>
  </tr>
</tbody>
</table><p>Cloudflare Snippets are lightweight when compared with Workers, offering 5ms maximum execution time, 2MB maximum memory and 32KB total package size. This comparably small footprint allows us to offer this to 99% of users at no additional cost, whilst also being sufficient for the identified use cases like HTTP header modification, URL rewriting and traffic routing - all of which don't need the vast resources offered by Cloudflare Workers.</p><table>
<thead>
  <tr>
    <th></th>
    <th>Cloudflare Snippets</th>
    <th>Cloudflare Workers Unbound<br />(For comparison)</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Runtime support</td>
    <td>JavaScript</td>
    <td>JavaScript and WASM</td>
  </tr>
  <tr>
    <td>Execution location</td>
    <td>Global - All Cloudflare locations</td>
    <td>Global - All Cloudflare locations</td>
  </tr>
  <tr>
    <td>Triggers supported</td>
    <td>Ruleset Engine Filters</td>
    <td>HTTP Request<br />HTTP Response<br />Cron Triggers</td>
  </tr>
  <tr>
    <td>Maximum execution time</td>
    <td>5ms</td>
    <td>30 Seconds HTTP<br />15 Minutes (Cron Trigger)</td>
  </tr>
  <tr>
    <td>Maximum memory</td>
    <td>2MB</td>
    <td>128MB</td>
  </tr>
  <tr>
    <td>Total package size</td>
    <td>32KB</td>
    <td>5MB</td>
  </tr>
  <tr>
    <td>Environment variables</td>
    <td>8/Snippet</td>
    <td>64/Worker</td>
  </tr>
  <tr>
    <td>Environment variable size</td>
    <td>1KB</td>
    <td>5KB</td>
  </tr>
  <tr>
    <td>Subrequests</td>
    <td>1/request</td>
    <td>1000/request</td>
  </tr>
  <tr>
    <td>Terraform Support</td>
    <td>✅</td>
    <td>✅</td>
  </tr>
  <tr>
    <td>Wrangler Support</td>
    <td></td>
    <td>✅</td>
  </tr>
  <tr>
    <td>Cron Triggers</td>
    <td></td>
    <td>✅</td>
  </tr>
  <tr>
    <td>Key Value Store</td>
    <td></td>
    <td>✅</td>
  </tr>
  <tr>
    <td>Durable Objects</td>
    <td></td>
    <td>✅</td>
  </tr>
  <tr>
    <td>R2 Integration</td>
    <td></td>
    <td>✅</td>
  </tr>
</tbody>
</table>
    <div>
      <h2>What will you be able to build with Cloudflare Snippets?</h2>
      <a href="#what-will-you-be-able-to-build-with-cloudflare-snippets">
        
      </a>
    </div>
    <p>Snippets will allow customers to migrate their existing workloads to Cloudflare. They will also open up a number of new possible use cases for customers. We have highlighted three common examples below, however there are many more to choose from.</p>
    <div>
      <h3>Example 1: Sending suspect bots to a honeypot</h3>
      <a href="#example-1-sending-suspect-bots-to-a-honeypot">
        
      </a>
    </div>
    <p>When creating Snippets customers will be able to access Cloudflare <a href="https://developers.cloudflare.com/workers/runtime-apis/request/">features</a> available in the Workers runtime, such as the bot score field. This enables customers to forward an HTTP request to a honeypot or use the RegExp Javascript function to change the URL construct being sent back to the end user when traffic is assigned a bot score below a certain threshold, e.g. <a href="https://developers.cloudflare.com/bots/concepts/bot-score/#:~:text=A%20bot%20score%20is%20a,request%20came%20from%20a%20human.">29 and lower</a>.</p>
            <pre><code>…
if (request.cf.botManagement.score &lt; 30) {
const honeypot = "https://example.com/";
return await fetch(honeypot, request);
…
}</code></pre>
            
    <div>
      <h3>Example 2: Cookie modification</h3>
      <a href="#example-2-cookie-modification">
        
      </a>
    </div>
    <p>Another common use case we foresee Snippets addressing is cookie modification. Usage can range from simply setting an expiry in five minutes by using <code>getTime</code> and <code>setTime</code> JavaScript functions to setting a dynamic cookie based on user request attributes for A/B testing purposes.</p>
            <pre><code>…
{
let res = await fetch(request);
res = new Response(res.body, res);
// 24h * 60m * 60s * 1000ms = 86400000ms
const expiry = new Date(Date.now() + 7 * 86400000).toUTCString();
const group = request.headers.get("userGroup") == "premium" ? "A" : "B";
res.headers.append(
      "Set-Cookie",
`testGroup=${group}; Expires=${expiry}; path=/`
    );
…</code></pre>
            
    <div>
      <h3>Example 3: URI query management</h3>
      <a href="#example-3-uri-query-management">
        
      </a>
    </div>
    <p>Customers can also deploy Cloudflare Snippets to do complex operations such as splicing the URI query value to selectively remove or inject additional parameters. Query string manipulation is typically done using Transform Rules. However, with Transform Rules the <code>set/</code> action is effectively a <code>replace</code> action. This action when applied to the URI query string will remove the entire value if there is one and set it to what the user specifies, thus overwriting it. This is a problem for customers who wish to selectively inject specific query parameters for matching traffic. For example,  setting an additional query, e.g. <code>?utm_campaign=facebook</code> when common social media platforms are detected in the user agent. With Snippets, customers will be able to do this selective removal and insertion using a simple piece of JavaScript, e.g.</p>
            <pre><code>…
if (userAgent.includes("Facebook")) {
      const url = new URL(request.url);
      const params = new URLSearchParams(url.search);
      params.set("utm_campaign", "facebook");
      url.search = params.toString();
      const transformedRequest = new Request(url, request)
…
}</code></pre>
            <p>We are excited to see what other use cases Cloudflare Snippets unlock for our customers.</p>
    <div>
      <h2>Will you stop adding actions to rulesets?</h2>
      <a href="#will-you-stop-adding-actions-to-rulesets">
        
      </a>
    </div>
    <p>The simple answer is no! We will continue to build out our no-code actions within the ruleset engine, developing new products to solve customer needs.</p><p>It may sound obvious - but a core component to feature improvement is talking to customers. Talking to Snippet users will help us understand what real life use cases Snippets help solve and highlight feature gaps we have in our product suite. We can then review if it makes sense to productise that use case, or leave it requiring Snippets.</p><p>We also understand that not everyone is a software developer. We are therefore exploring how we can make Snippets accessible to all by creating selectable templates available in a library that can be copied and modified by customers, with minimum coding knowledge required. With Snippets, powerful won’t mean difficult.</p>
    <div>
      <h2>Accessing Cloudflare Snippets</h2>
      <a href="#accessing-cloudflare-snippets">
        
      </a>
    </div>
    <p>Snippets are currently under development — you can sign up <a href="https://www.cloudflare.com/lp/cloudflare-snippets/">here</a> to join the waitlist for access.</p><p>We hope to begin admitting users into the closed beta in early 2023, with an open beta to follow.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Snippets]]></category>
            <category><![CDATA[JavaScript]]></category>
            <guid isPermaLink="false">zV6omBtZzUdVJucURgijz</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Dynamic URL redirects: 301 to the future]]></title>
            <link>https://blog.cloudflare.com/dynamic-redirect-rules/</link>
            <pubDate>Tue, 27 Sep 2022 13:00:00 GMT</pubDate>
            <description><![CDATA[ With Dynamic redirects, users can redirect visitors to another webpage or website based upon hundreds of options such as the visitor's country of origin or language, without having to write a single ]]></description>
            <content:encoded><![CDATA[ <p></p><p>The Internet is a dynamic place. Websites are constantly changing as technologies and business practices evolve. What was front-page news is quickly moved into a sub-directory. To ensure website visitors continue to see the correct webpage even if it has been moved, administrators often implement URL redirects.</p><p>A URL redirect is a mapping from one location on the Internet to another, effectively telling the visitor's browser that the location of the page has changed, and where they can now find it. This is achieved by providing a virtual ‘link’ between the content’s original and new location.</p><p>URL Redirects have typically been implemented as Page Rules within Cloudflare, however Page Rules only match on the URL, rather than other elements such as the visitor's source country or preferred language. This limitation meant customers with a need for more dynamic URL redirects had to implement alternative solutions such Cloudflare Workers to achieve their goals.</p><p>To simplify the management of these more complex use cases we have created <b>Dynamic Redirects.</b> With Dynamic Redirects, users can redirect visitors to another webpage or website based upon hundreds of options such as the visitor's country of origin or language, without having to write a single line of code.</p>
    <div>
      <h3>More than a URL</h3>
      <a href="#more-than-a-url">
        
      </a>
    </div>
    <p>For nine years users were limited to 125 URL redirects per zone. This limitation meant those with a need for more URL redirects had to implement alternative solutions such <a href="https://workers.cloudflare.com/">Cloudflare Workers</a> to achieve their goals.</p><p>In December 2021, we launched <a href="/maximum-redirects-minimum-effort-announcing-bulk-redirects/">Bulk Redirects</a>, allowing up to 100,000 URL redirects per account at the time. In April 2022 we increased this maximum number to <b>over six million</b> URL redirects per account. However, there is still a gap in the ‘URL redirect’ product unfulfilled. Until now.</p><p>Bulk Redirects, much like the ‘Forwarding URL’ Page Rule, are prescriptive URL redirects. You tell us what URL to look for, and where to redirect the user to when they visit it. We can support this use case at a huge scale.</p><table>
<thead>
  <tr>
    <th>If a visitor asks for..</th>
    <th>Redirect them to…</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>https://www.cloudflare.com/r2-storage</td>
    <td>https://www.cloudflare.com/products/r2</td>
  </tr>
  <tr>
    <td>https://www.cloudflare.com/apishield</td>
    <td>https://www.cloudflare.com/products/api-gateway</td>
  </tr>
  <tr>
    <td>https://www.cloudflare.com/welcome-center</td>
    <td>https://developers.cloudflare.com/fundamentals/get-started/</td>
  </tr>
</tbody>
</table><p>That's a simple concept to understand, however user needs have evolved. What if a user wanted to redirect visitors to a localized version of the requested page based on their preferred language? What if a user wanted to redirect visitors to their local subsidiary on the website? Or direct them to an optimized site when they visit from a mobile device? Suddenly, this well understood concept doesn’t work - and they have to deploy code in Workers to solve what is actually a common problem. And common problems deserve to be productized.</p><p>This is where Dynamic Redirects can help. The new product provides the same consistent user interface as Transform Rules, Custom Rules, Bulk Redirects, etc. and provides a new action allowing for the target URL to be dynamically created, much like the dynamic rewrite action offered in <a href="https://developers.cloudflare.com/rules/transform/url-rewrite/">Transform Rules</a>.</p><p>This dynamic action frees the user from having to define explicitly what the target URL should look like, and instead provides them with a full gamut of fields and functions to custom generate the target URL based upon the parameters of the request. For example, rather than redirecting all traffic for <a href="http://www.example.com/shop"><code>www.example.com/shop</code></a> to <a href="http://www.example.com/en/shop"><code>www.example.com/en/shop</code></a>, users can conceptually redirect the traffic to <a href="http://www.example.com/%7BPREFERRED_LANGUAGE%7D/shop"><code>www.example.com/{PREFERRED_LANGUAGE}/shop</code></a> (not actual syntax!). With this, traffic from a browser with a preferred language of French will be redirected to <a href="http://www.example.com/fr/shop"><code>www.example.com/fr/shop</code></a>, likewise those with a preferred language of German will be redirected to <a href="http://www.example.com/de/shop"><code>www.example.com/de/shop</code></a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/KSMb1ZP3E4N1nFuUPDFde/34686a5ace57a0d4922a2a0d01befd35/image3-38.png" />
            
            </figure><p>The other big difference between Dynamic Redirects and  Page Rules is in the filtering. Page Rules are limited to filtering on a URL, or a URL with asterisks as wildcards. Dynamic Redirects is built atop our lightning-fast <a href="https://developers.cloudflare.com/ruleset-engine/about/rulesets/">Rulesets Engine</a>, which also runs products such as Transform Rules, Custom Rules (WAF), Bulk Redirects and API Shield.</p><p>Due to this, Dynamic Redirects offers almost the entire suite of Ruleset Engine <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">fields</a> for use in filtering; from <code>http.request.full_uri</code> for the whole URL, to <code>ip.geoip.country</code> (where is the visitor located) and <code>http.request.accepted_languages[]</code> (the language preferred by the visitor). The possibilities are endless.</p><p>Users can also now use <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/operators/">logical operators</a> such as ‘OR’. Where previously, if a user wanted to redirect five distinct URLs to the same URL they would need to deploy five Page Rules. Today, they can simply use an ‘OR’ to consolidate this use case into just one Dynamic Redirect rule:</p><table>
<thead>
  <tr>
    <th>#</th>
    <th>Expression</th>
    <th>Destination URL</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>1</td>
    <td>(http.request.full_uri eq "https:/www.cloudflare.com/partners/integrations/") or (http.request.full_uri eq "https:/www.cloudflare.com/partners/become-a-partner/") or (http.request.full_uri eq "https:/www.cloudflare.com/partners/digital-agency/") or (http.request.full_uri eq "https:/www.cloudflare.com/partners/technology-integrator/") or (http.request.full_uri eq "https:/www.cloudflare.com/partners/view-partners/")</td>
    <td>www.cloudflare.com/partners/</td>
  </tr>
</tbody>
</table><p>We can further simplify this use case in the future by adding hostname lists, allowing users to add URLs to a list and reference it from within the rule expression, similar to IP Lists. This allows an expression like (http.request.full_uri in $vanity_urls), for example.</p>
    <div>
      <h3>A dedicated quota, just for U(RL)</h3>
      <a href="#a-dedicated-quota-just-for-u-rl">
        
      </a>
    </div>
    <p>Page Rules are used to set everything from configuration and caching behaviour to header modification and also URL redirection (Forwarding URL). This means that users tend to run out of available rules quickly.</p><p>To address this, we’re matching the Page Rule quota in each of the four new products that are being announced today. This means where in Page Rules an Enterprise customer would get 125 Page Rules to share amongst the aforementioned functions, in Dynamic Redirects they have 125 rules just for redirects. This number can be increased for Enterprise customers, also.</p><p>We’re also increasing the quota for free plans; where today free plans get three Page Rules, they will now get 10 rules for dynamic redirects, along with each of the other three products (cache, origin, config rules). That's a net increase of 37 additional rules!</p><table>
<thead>
  <tr>
    <th>Plan</th>
    <th>Page Rules</th>
    <th>Dynamic Redirects</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Enterprise</td>
    <td>125</td>
    <td>125+</td>
  </tr>
  <tr>
    <td>Business</td>
    <td>50</td>
    <td>50</td>
  </tr>
  <tr>
    <td>Pro</td>
    <td>20</td>
    <td>25</td>
  </tr>
  <tr>
    <td>Free</td>
    <td>3</td>
    <td>10</td>
  </tr>
</tbody>
</table><p>Users can now get more out of their Cloudflare setup, being more specific about when traffic is redirected, optimizing cache and adjusting which settings are and aren't applied - without having to trade off between these areas due to a limit in rules quota.</p>
    <div>
      <h3>Localized redirects</h3>
      <a href="#localized-redirects">
        
      </a>
    </div>
    <p>One of the examples covered earlier is being able to redirect visitors to localized content depending on their preferred language.</p><p>This can be done by analyzing the ‘Accept-Language’ header sent by the browser, which is stored as an array in the field http.request.accepted_languages[]. This field is an array of the values received by Cloudflare within the Accept-Language HTTP request header, sorted in descending weight order. This header is calculated based on the preferences set by the visitor in the ‘Language’ section of their web browser.</p><p>For example, if the visitors browser sends an 'Accept-Language' header containing "Accept-Language: fr-CH, fr;q=0.8, en;q=0.9, de;q=0.7, *;q=0.5", then the field http.request.accepted_languages[0] would contain "en", with http.request.accepted_languages[1] containing "fr" and so forth.</p><p>With this information, we can create a dynamic redirect using the action:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ffOgGltGbr8MSOJW90DP7/10d53bb20a79d263460ec13cff47a110/image1-62.png" />
            
            </figure><p>With this rule in place, traffic from visitors with a preferred language of English (en) will be redirected to <a href="http://www.example.com/en/shop"><code>www.example.com/en/shop</code></a>. The rule can be duplicated for other languages also, ensuring those with a preferred language of French (fr) will be redirected to <a href="http://www.example.com/fr/shop"><code>www.example.com/fr/shop</code></a>.</p>
    <div>
      <h3>Mobile redirects, cookie redirects, …</h3>
      <a href="#mobile-redirects-cookie-redirects">
        
      </a>
    </div>
    <p>There are so many use cases for Dynamic Redirects we couldn't fit them all in this blog.</p><p>Other possible use cases include mobile redirects, redirects based on cookies, redirects to different endpoints based on request headers for live testing. The potential list is huge, and we can't wait to hear what you come up with. Try it <a href="https://dash.cloudflare.com/?to=/:account/:zone/rules/">today</a>!</p><p>If you want to read more, refer to our <a href="https://developers.cloudflare.com/rules/url-forwarding/single-redirects/">documentation</a>.</p><p>
</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Page Rules]]></category>
            <category><![CDATA[Origin Rules]]></category>
            <category><![CDATA[Cache Rules]]></category>
            <category><![CDATA[Config Rules]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">5x03cYdI8N8okRttILtgh3</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[The future of Page Rules]]></title>
            <link>https://blog.cloudflare.com/future-of-page-rules/</link>
            <pubDate>Tue, 27 Sep 2022 13:00:00 GMT</pubDate>
            <description><![CDATA[ Learn about four new products that will eventually replace Page Rules by putting more power into the hands of users. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Page Rules is one of our most well-used products. Adopted by millions of users, it is used for configuring everything from cache to security levels. It is the ‘If This Then That’ of Cloudflare. Where the ‘If…’ is a URL, and the ‘Then That’ is changing how we handle traffic to specific parts of a ‘zone’. But it's not without its limitations.</p><p>Page Rules can only trigger on a URL or URL pattern. There is a maximum of 125 Page Rules per zone. Page Rules are also tricky to debug. Even the idea of a “Page” sounds rather old-fashioned now.</p><p>We’re replacing Page Rules with four new dedicated products, offering increased rules quota, more functionality, and better granularity. These products are available immediately for testing. Page Rules is not going away yet, but we do anticipate being able to formally begin the end-of-life process soon.</p>
    <div>
      <h3>Why change?</h3>
      <a href="#why-change">
        
      </a>
    </div>
    <p>In the 10 years since it <a href="/introducing-pagerules-fine-grained-feature-co/">launched</a>, Page Rules has become a well established product, and a very well adopted one. One <i>million</i> Page Rules have been deployed in the past three months alone.</p><p>Page Rules are used to tune how long files should be cached. Page Rules are used to override zone-wide settings for certain URLs. Page Rules are used to create simple URL redirects. Page Rules are used to selectively add/remove HTTP headers. Page Rules is a <i>multitool</i> of a product.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/cyicKWH3ZiZNtQmjNSGEi/2f7fbea400ccc34e9d4996c999fa5980/image3-33.png" />
            
            </figure><p>Photo by <a href="https://unsplash.com/@zelebb?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Andrey Matveev</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p><p>Like multitools and other generalist products, Page Rules does a good job at many things, but is not best-of-breed at anything. This is the trade-off of generalism. As we have grown as a company our customers have rightfully demanded more. Filtering on URL-alone is no longer sufficient; users are demanding more - and today we are delivering.</p><p>Over the last two years we have been working on the future of Page Rules and distilling hundreds of pieces of feedback into common themes, such as:</p><ol><li><p>I need more than 125 Page Rules</p></li><li><p>I need to be able to trigger Page Rules on more than just the URL</p></li><li><p>I need to be able to use regular expressions in my Page Rules</p></li><li><p>It's hard for me to understand how different Page Rules interact one another</p></li><li><p>Page Rules is hard to debug</p></li><li><p>I want more actions in Page Rules</p></li></ol><p>Analyzing these themes we came to the conclusion that the best thing for Page Rules was to disassemble it and create new discrete products, each of which could be best-of-breed for their relevant areas. This dissolution would also provide better clarity regarding interoperation (cache vs configuration vs …), and make debugging simpler.</p><p>Today, we announce those new products:</p><p><b>1. Cache</b> <b>Rules</b>: A dedicated product for setting and tuning ‘everything caching’.</p><p><b>2. Configuration</b> <b>Rules</b>: A dedicated product for setting and selectively enabling, disabling and overriding zone-wide settings.</p><p><b>3. Dynamic</b> <b>Redirects</b>: Like ‘Forwarding URL’ but turned up to 11. Redirect based on the visitors country, their preferred language, their device type, use regular expressions (plan level dependant) and more.</p><p><b>4. Origin</b> <b>Rules</b>: A dedicated product for ‘where does this traffic go where it leaves Cloudflare’. Not only have we added host header and resolve override into this new product (ENT only), we’ve also productized another common Workers use case by enabling customers to selectively override the destination port. We’ve also added the ability to override the Server Name Indication (SNI).</p><p>All four of these products are available for use now via the dashboard, API and Terraform - and sitting alongside Transform Rules provide the replacement suite of products that will eventually enable an Page Rules end-of-life announcement.</p><p>We have dedicated blogs for each of these product launches with more information on what they offer and problems they address.</p>
    <div>
      <h3>Order of execution</h3>
      <a href="#order-of-execution">
        
      </a>
    </div>
    <p>One of the main benefits of this new product suite is clarity.</p><p>Page Rules is a black box, where traffic goes in, ‘things happen’, and traffic comes out. It's hard to debug the interplay between cache, configuration, header modification etc and it can vary from zone to zone as it's entirely user defined.</p><p>By having discrete, separate areas per ‘function’, it makes visualizing the flow of a HTTP request much easier:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/WNh8WO5B7n3AeI9oczS8I/01e83a7564af29aa0014de69ff245de9/image1-58.png" />
            
            </figure><p>Rather than a single lozenge of Page Rules, we now have visibility that Origin Rules will run first, then Cache Rules, then Configuration Rules, and finally Dynamic Redirects. This means we will modify host headers first, before tuning cache settings. And we will tune the cache parameters before we modify which settings are enabled for the specific traffic.</p><p>We have integrated these new products into the <a href="/traffic-sequence-which-product-runs-first/">Traffic Sequence</a> dashboard element also.</p><p>(For zones using both Page Rules and this new suite of products: The new products will take precedence over Page Rules. This means that Page Rules will be overridden if a conflict occurs).</p>
    <div>
      <h3>I need more than 125 Page Rules</h3>
      <a href="#i-need-more-than-125-page-rules">
        
      </a>
    </div>
    <p>One of the limitations of Page Rules was how each Page Rule was stored and executed on our backend architecture. We are unable to offer more than 125 Page Rules per zone before we begin to see a performance hit - latency on HTTP requests begins to increase as evaluating them vs the Page Rules takes longer and longer. To combat this limitation users moved simple workloads to Workers, or split the zone into multiple sub domains, each with a 125 Page Rules quota. Neither of these are ideal for the customer.</p><p>To combat this limitation we have built <i>all</i> of the replacement products atop our lightning-fast <a href="https://developers.cloudflare.com/ruleset-engine/about/rulesets/">Rulesets Engine</a>, which also runs products such as Transform Rules, Custom Rules (WAF), Bulk Redirects and API Shield.</p><p>This allows us to offer much more quota to customers, as this engine is built to scale well beyond 125 rules per product. The table below summarizes the before and after impact of these new products, showing the default rules quota per plan:</p><table>
<thead>
  <tr>
    <th>Plan</th>
    <th>Page Rules</th>
    <th>Origin Rules</th>
    <th>Cache Rules</th>
    <th>Config Rules</th>
    <th>Dynamic Redirects</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>Enterprise</td>
    <td>125</td>
    <td>125+</td>
    <td>125+</td>
    <td>125+</td>
    <td>125+</td>
  </tr>
  <tr>
    <td>Business</td>
    <td>50</td>
    <td>50</td>
    <td>50</td>
    <td>50</td>
    <td>50</td>
  </tr>
  <tr>
    <td>Pro</td>
    <td>20</td>
    <td>25</td>
    <td>25</td>
    <td>25</td>
    <td>25</td>
  </tr>
  <tr>
    <td>Free</td>
    <td>3</td>
    <td>10</td>
    <td>10</td>
    <td>10</td>
    <td>10</td>
  </tr>
</tbody>
</table><p><i>Additional rules cannot be purchased for these new products.</i></p><p>This means zone’s on the Enterprise plan now have a minimum of <b>500</b> rules to use where before they had 125 via Page Rules. For Enterprises the quota for the new products is negotiable. Pro plan zones go from 20 Page Rules to 100.  Combined with the fine-grained control that the ruleset engine offers, these changes allow customers to customize their zone’s traffic to the finest of margins.</p><p>The other benefit from building all of these products on the Rulesets Engine is extensibility. Currently there are over 30 products that are built and running on the Rulesets Engine. Each of these products is essentially a logical bucket called a ‘phase’ which contains a single ruleset scoped to that product. Each phase is restricted to specific actions and fields, for example the field cf.bot_management.score is unavailable in http_request_transform as we have not calculated the bot score at the time we perform URL rewrites. Also, only the <code>rewrite</code> action is permitted. Whereas in Origin Rules (http_request_origin) we only allow the action <code>route</code></p><p>When we create new capabilities for a product that is built atop the Rulesets Engine it is trivially simple for us to extend that new capability to other products at a later date.</p><p>For example, we added a new <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">‘field’</a>, <code>http.request.accepted_languages</code> to Transform Rules earlier in the year. Until recently this was only available in Transform Rules. However, as both products are built on the <a href="https://developers.cloudflare.com/ruleset-engine/about/rulesets/">Rulesets Engine</a> it was trivial to enable this feature for Dynamic Redirects. This allows customers to perform URL redirects based on the visitor's language preference, and the cost to us from an engineering perspective is negligible as the field is already implemented.</p><p>This also means in the future should a new field be created for Cache Rules due to a customer request, e.g. http.request.super_cool_field, in a matter of clicks we can enable this field for any of the other 30 products rather than have to duplicate effort across multiple platforms.</p><p>Simply put, the more products we build on top of the Rulesets Engine, the faster we can move and the more functionality we can put into users hands.</p>
    <div>
      <h3>A single user experience</h3>
      <a href="#a-single-user-experience">
        
      </a>
    </div>
    <p>The most important benefit of all is consistency. Each of these products has a consistent and predictable API. A consistent and predictable Terraform configuration, and a consistent and predictable user experience in the dashboard. The ruleset engine allows us to keep everything the same except for the ‘action’. The filtering stays the same, the API stays the same, the UI stays (largely) the same, the only change is the ‘…then’, the action section of the rule.</p><p>This ensures that as a user when you are clicking around the dashboard setting up a new zone you aren't having to learn each individual product’s page and how to navigate it. The only part you need to learn is what makes that product unique, its <i>actions</i>:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6hfXLnp7HiV9sziDFJl9zw/cf888d5c543db9380d81398bb60b46c2/image4-15.png" />
            
            </figure><p>Finally, when we add a new product, extending the Terraform provider to support it is trivial. That consistent experience has been a north star for us during this project and will continue to be in the future.</p>
    <div>
      <h3>Try it them now</h3>
      <a href="#try-it-them-now">
        
      </a>
    </div>
    <p>We are replacing Page Rules with a new suite of products, each built to be best-of-breed and put more power into the hands of our users.</p><p>Read more about the new products in each of their dedicated blogs. Then, <a href="https://dash.cloudflare.com/?to=/:account/:zone/rules/">try</a> them for yourself!</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Page Rules]]></category>
            <category><![CDATA[Origin Rules]]></category>
            <category><![CDATA[Cache Rules]]></category>
            <category><![CDATA[Config Rules]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">1udqPnVLDWQhuQf9MtMyt2</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Where to? Introducing Origin Rules]]></title>
            <link>https://blog.cloudflare.com/origin-rules/</link>
            <pubDate>Tue, 27 Sep 2022 13:00:00 GMT</pubDate>
            <description><![CDATA[ Origin Rules is a dedicated product for ‘where does this traffic go where it leaves Cloudflare.’ Customers are able to match on an HTTP request using filters and override the host, port, SNI, and the origin a request resolves to. ]]></description>
            <content:encoded><![CDATA[ <p></p>
    <div>
      <h3>Host headers are key</h3>
      <a href="#host-headers-are-key">
        
      </a>
    </div>
    <p>The <code>host</code> header of an HTTP request tells the receiving server (‘origin’) which website or application a client wants to access.</p><p>When an origin receives an HTTP request, it checks the value of this ‘host’ header to see if it is responsible for that traffic. If it finds a match the request will be routed appropriately and the correct data will be returned to the visitor. If it doesn't find a match, it will return an error telling the visitor it doesn’t have an application or website that matches what they are asking for.</p><p>In simple setups this is often not an issue. All requests for <code>example.com</code> are sent to the same origin, which sees the host header <code>example.com</code> and returns the relevant files. However, not all setups are as straightforward. SaaS (Software-as-a-Service) platforms use host headers to route visitors to the correct instance or <a href="https://www.cloudflare.com/developer-platform/solutions/s3-compatible-object-storage/">S3-compatible</a> bucket.</p><p>To ensure the correct content is still loaded, the host header must equal the name of this instance or bucket to allow the receiving origin to route it correctly. This means at some point in the traffic flow, the host header must be changed to match the instance or bucket name, before being sent to the SaaS platform.</p><p>Another common issue is when web applications on an origin are listening on a non-standard port, e.g. 8001.  Requests sent via HTTPS will by default arrive on port 443. To ensure the traffic isn't subsequently sent to port 443 on the origin the traffic must be intercepted and have the destination port changed to 8001. This ensures the origin is receiving traffic where it expects it. Previously this would be done as a Cloudflare Worker, Cloudflare Spectrum application or by running a dedicated application on the origin.</p><p>Both of these scenarios require customers to write and maintain code to intercept HTTP requests and parse them to ensure they go to the correct origin location, the correct port on that origin, and with the correct host header. This is a burden for administrators to maintain, particularly as legacy applications are migrated away from on-premise and into SaaS.</p><p>Cloudflare users want more control on where their traffic goes to - when it goes there - and what it looks like when it arrives. And they want this to be simple to set up and maintain.</p><p>To meet those demands we are today announcing <b>Origin Rules</b>, a new product which allows for overriding the host header, the Server Name Indication (SNI), destination port and <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS resolution</a> of matching HTTP requests.</p><p>Origin Rules is now the one-stop destination for users who want to change which origin traffic goes to, when this should happen, and what that traffic looks like when it arrives - all without ever having to write a single line of code.</p>
    <div>
      <h3>One hostname, many origins</h3>
      <a href="#one-hostname-many-origins">
        
      </a>
    </div>
    <p>Setting up your service on Cloudflare is very simple. You tell us your domain name, <code>example.com</code>, and where traffic should be sent to when we receive requests that match it. Often this is an IP address. You can also create subdomains, e.g. <code>shop.example.com</code>, and follow the same pattern.</p><p>This allows for the web server running <code>www.example.com</code> to live on the IP address 98.51.100.12, and the web server responsible for running <code>shop.example.com</code> to live on a different IP address, e.g. 203.0.113.34. When Cloudflare receives a request for <code>shop.example.com</code>, we send that traffic to the web server at <code>203.0.113.34</code> with the <b>host header</b> <code>shop.example.com</code>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4QtPCUPsB2vqa9Qy18YH87/15d7dd8e90f7d09d24e2ceee3a8f5d63/image6-10.png" />
            
            </figure><p>As most web servers commonly serve multiple websites, this host header is used to ensure the correct content is loaded. The web server looks at the request it receives, checks the host header, and tries to match it against websites it's been told to serve. If it finds a match, it will route this request to the corresponding website's configuration and the correct files are returned to the visitor.</p><p>This has been a foundational principle of the Internet for many years now. Unsurprisingly however, new solutions emerge and user needs evolve.</p><p>We have heard from users who want to be able to send different URLs to different origins, such as a SaaS provider for their <a href="https://www.cloudflare.com/ecommerce/">ecommerce</a> platform and a SaaS provider for their support desk. To achieve this, user’s could, and do, decide to run and manage their own reverse proxy running at this IP address to act as a router. This allows a user to send all traffic for <code>example.com</code> to a single IP address, and let the reverse proxy determine where it goes next:</p>
            <pre><code>    location ~ ^/shop { 
        proxy_set_header   Host $http_host;
        proxy_pass         "https://203.0.113.34/$1";
    }</code></pre>
            <p>This reverse proxy would detect the traffic sent with the host header <code>example.com</code> with a URI path starting with /shop, and send those matching HTTP requests to the correct SaaS application.</p><p>This is potentially a complex system to maintain, however, and as it is an ‘extra hop’, there is an increase in latency as requests first go through Cloudflare, to the origin server, then back to the SaaS provider - who may also be on Cloudflare. In a world rapidly migrating away from on-premise software to SaaS platforms, running your own server to do this specific function goes against the grain.</p><p>Users therefore want a way to tell Cloudflare - ‘for all traffic to <a href="http://www.example.com">www.example.com</a>, send it to 98.51.100.12. BUT, if you see any traffic to <a href="http://www.example.com/shop">www.example.com/shop</a>, send it to 203.0.113.34’. This is what we call a <b>resolve override</b>. It is essentially a DNS override.</p><p>With a resolve override in place, HTTP requests to <code>www.example.com/shop</code> are now correctly sent by Cloudflare to 203.0.113.34 as requested. And they fail. The web server says it doesn’t know what to do with the HTTP request. This is because the <code>host</code> header is still <code>www.example.com</code>, and the web server does not have any knowledge of that website.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1SrXZvJ7n4QlU19sqk81Wk/3f7ca877859ef306b0449dea32a8e2ff/image4-19.png" />
            
            </figure><p>To fix this, we need to make sure these requests are sent to 203.0.113.34 with a host header of <code>shop.example.com</code>. This is what is known as a <b>host header override.</b> Now, requests to <code>www.example.com/shop</code> are not only correctly routed to 203.0.113.34, but the host header is changed to one that the ecommerce software is expecting - and thus the request is correctly routed, and the visitors sees the correct content.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3rPXzJ1UgVPGrHyI4nd68t/da84f9efcae86b2b1cac10fb7cb1fad5/image7-7.png" />
            
            </figure><p>The management of these selective overrides, and other overrides, is achieved via <b>Origin Rules</b>.</p><p>Origin Rules allow users to route HTTP traffic to different destinations and override certain request characteristics based on a number of criteria such as the visitor's country, IP address or HTTP request headers.</p>
    <div>
      <h3>Route on more than a URL</h3>
      <a href="#route-on-more-than-a-url">
        
      </a>
    </div>
    <p>Origin Rules is built on top of our <a href="https://developers.cloudflare.com/ruleset-engine/">ruleset engine</a>. This gives users the ability to perform routing decisions based on many fields including the requested URL, and also the visitors country, specific request headers, and more.</p><p>Using a combination of one or more of these available <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">fields</a>, users can ensure traffic is routed to specific backends, only when specific criteria are met such as host, URI path, visitor’s country, and HTTP request headers.</p><p>Historically, host header override and resolve override were achieved with the setting of a <a href="https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-">Page Rule</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ls9SG1BSKQJvYXkZ60Y8Q/70ca974801df2c918ad2c138f6d1598b/image5-19.png" />
            
            </figure><p>Page Rules is the ‘If This Then That’ of Cloudflare. Where the ‘If…’ is a URL, and the ‘Then That’ is changing how we handle traffic to specific parts of a ‘zone’. It allows users to selectively change how traffic is handled, or in this case, where traffic is sent. It is very well adopted, with over one million Page Rules in the past three months alone.</p><p>Page Rules, however, are limited to performing actions based upon the requested URL. This means if users want to change the backend a HTTP request goes to, they need to make that decision based on the URL alone. This can be challenging for users who may want to perform this decision-making on more nuanced aspects, like the user agent of the visitor or on the presence of a specific cookie.</p><p>With Origin Rules, users can perform host header override, resolve override, destination port override and SNI overrides - based on any number of criteria - not only the requested URL. This unlocks a number of interesting use cases.</p>
    <div>
      <h3>Example use case: integration with cloud storage endpoints</h3>
      <a href="#example-use-case-integration-with-cloud-storage-endpoints">
        
      </a>
    </div>
    <p>One such use case is using a cloud storage provider as a backend for static assets, such as images. Enterprise zones can use a combination of host header override and resolve override actions to override the destination of outgoing HTTP requests. This allows for all traffic to <code>example.net</code> to be sent to <code>98.51.100.12</code>, but requests to <code>example.net/*.jpg</code> be sent to a publicly accessible S3-compatible bucket.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/swQTQskk9TNp4Ghc6EmeP/54fdc46baa87a3a3d1af0bec66b031ca/image1-61.png" />
            
            </figure><p>To do this, the user would create an Origin Rule setting the resolve override value to be a DNS record on their own zone, pointing to the S3 provider’s URL. This ensures that requests matching the pattern are routed to the S3 URL. However, when the cloud storage provider receives the request it will drop it - as it does not know how to route requests for the host <code>example.net</code>. Therefore, users also need to deploy a host header override, changing this value to match the bucket name - e.g. <code>bucket.example.net</code>.</p><p>Combined, this ensures requests matching the pattern correctly reach the cloud storage provider - with a host header it can use to correctly route the request to the correct bucket.</p><p>Origin Rules also enable new use cases. For example, a user can use Origin Rules to A/B test different cloud providers prior to a cut over. This is possible by using the field <code>http.request.cookies</code> and routing traffic to a new, test bucket or cloud provider based on the presence of a specific cookie on the request.</p><p>Users with multiple storage regions can also use the <code>ip.geoip.country</code> field within a filter expression to route users to the closest storage instance, reducing latency and time to load for these requests.</p>
    <div>
      <h3>Destination port override</h3>
      <a href="#destination-port-override">
        
      </a>
    </div>
    <p>Cloudflare listens on 13 <a href="https://developers.cloudflare.com/fundamentals/get-started/reference/network-ports/">ports</a>; seven ports for HTTP, six ports for HTTPS. This means if a request is sent to a URL with the destination port of 443, as is standard for HTTPS, it will be sent to the origin server with a destination port of 443. The same 1:1 mapping applies to the other twelve ports.</p><p>But what if a user wanted to change that mapping? For example, when the backend origin server is listening on port 8001. In this scenario, an intermediate service is required to listen for requests on port 443 and create a sub-request with the destination port set to 8001.</p><p>Historically this was done on the origin server itself - with a reverse proxy server listening for requests on 443 and other ports and proxying those requests to another port.</p>
            <pre><code>Apache
 &lt;VirtualHost *:*&gt;
        ProxyPreserveHost On
        ProxyPass / http://0.0.0.0:8001/
        ProxyPassReverse / http://0.0.0.0:8001/
        ServerName example.com
    &lt;/VirtualHost&gt;

NGINX
server {
  listen 443;
  server_name example.com;
    location / {
      proxy_pass http://0.0.0.0:8001;
    }
}</code></pre>
            <p>More recently, users have deployed <a href="https://workers.cloudflare.com/">Cloudflare Workers</a> to perform this service, modifying the destination port before HTTP requests ever reach their servers.</p><p>Origin Rules simplifies destination port modifications, letting users change the destination port via a simple rules experience without ever having to write a single line of code or configuration:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/NZLYSIrxlREcyXmAmdlpJ/9c1773381c3a2312275e1fab51e073c2/image2-52.png" />
            
            </figure><p>This destination port modification can also be triggered on almost any <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">field</a> available in the ruleset engine, also, allowing users to change which port to send requests to based on URL, URI path, the presence of HTTP request header and more.</p>
    <div>
      <h3>Server Name Indication</h3>
      <a href="#server-name-indication">
        
      </a>
    </div>
    <p>Server Name Indication (SNI) is an addition to the TLS encryption protocol. It enables a client device to specify the domain name it is trying to reach in the first step of the TLS handshake, preventing common “name mismatch” errors. Customers using Cloudflare for SaaS may have millions of hostnames pointing to Cloudflare. However, the origin that these requests are sent to may not have an individual certificate for each of the hostnames.</p><p>Users today have the option of doing this on a per custom hostname basis using <a href="https://developers.cloudflare.com/cloudflare-for-saas/start/advanced-settings/custom-origin/"><i>custom origins</i></a> in SSL for SaaS, however for Enterprise customers not using this setup it was an impossible task.</p><p>Enterprise users can use Origin Rules to override the value of the SNI, providing it matches any other zone in their account. This removes the need for users to manage multiple certificates on the origin or choose not to encrypt connections from Cloudflare to the origin.</p>
    <div>
      <h3>Try it now</h3>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>Origin Rules are available to use <a href="https://dash.cloudflare.com/?to=/:account/:zone/rules/">now</a> via API, Terraform, and our dashboard. Further details can be found on our <a href="https://developers.cloudflare.com/rules/origin-rules/">Developers Docs</a>. Currently, destination port rewriting is available for all our customers as part of Origin Rules. Resolve Override, Host Header Override and SNI overrides are available to our Enterprise users.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Origin Rules]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">5kYzEPiCft3JzD9lyJJ7lV</guid>
            <dc:creator>Matt Bullock</dc:creator>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing Configuration Rules]]></title>
            <link>https://blog.cloudflare.com/configuration-rules/</link>
            <pubDate>Tue, 27 Sep 2022 13:00:00 GMT</pubDate>
            <description><![CDATA[ Configuration Rules is the new and improved way for Cloudflare customers to control and manipulate features that are enabled or disabled for specific requests on their zone. ]]></description>
            <content:encoded><![CDATA[ <p></p>
    <div>
      <h3>A powerful new set of tools</h3>
      <a href="#a-powerful-new-set-of-tools">
        
      </a>
    </div>
    <p>In 2012, we introduced <a href="/introducing-pagerules-fine-grained-feature-co/">Page Rules</a> to the world, announcing:</p><blockquote><p><i><b>“Page Rules is a powerful new set of tools that allows you to control how CloudFlare works on your site on a page-by-page basis.”</b></i></p></blockquote><p>Ten years later, and with all F’s lowercase, we are excited to introduce <b>Configuration Rules</b> — a Page Rules successor and a much improved way of controlling Cloudflare features and settings. With Configuration Rules, users can selectively turn on/off features which would typically be applied to every HTTP request going through the zone. They can do this based on URLs - and more, such as cookies or country of origin.</p><p>Configuration Rules opens up a wide range of use cases for our users that previously were impossible without writing custom code in a <a href="https://workers.cloudflare.com/">Cloudflare Worker</a>. Such use cases as A/B testing configuration or only enabling features for a set of file extensions are now made possible thanks to the rich filtering capabilities of the product.</p><p>Configuration Rules are available for use immediately across all plan levels.</p>
    <div>
      <h3>Turn it on, but only when…</h3>
      <a href="#turn-it-on-but-only-when">
        
      </a>
    </div>
    <p>As each HTTP request enters a Cloudflare zone we apply a configuration. This configuration tells the Cloudflare server handling the HTTP request which features the HTTP request should ‘go’ through, and with what settings/options. This is defined by the user, typically via the dashboard.</p><p>The issue arises when users want to enable these features, such as Polish or Auto Minify, only on a subset of the traffic to their website. For example, users may want to disable Email Obfuscation but only for a specific page on their website so that contact information is shown correctly to visitors. To do this, they can deploy a <b>Configuration Rule.</b></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5lCHWaSYhQ6dCCY4l7auNM/d937ed4b350a30d95f54e7fec70e46dc/image6-9.png" />
            
            </figure><p>Configuration Rules lets users selectively enable or disable features based on one or more ruleset engine <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">fields</a>.</p><p>Currently, there are 16 available <i>actions</i> within Configuration Rules. These actions range from Disable Apps, Disable Railgun and Disable Zaraz to Auto Minify, Polish and Mirage.</p><p>These actions effectively ‘override’ the corresponding zone-wide setting for matching traffic. For example, Rocket Loader may be enabled for the zone <code>example.com</code>:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2pDnBa8tNufAha85zYcwuV/db55216d9fd961bacd1b2939c0253471/image1-60.png" />
            
            </figure><p>If the user, however, does not want Rocket Loader to be enabled on their checkout page due to an issue it causes with a specific JavaScript element, they could create a Configuration Rule to selectively disable Rocket Loader:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1VekSaqhCwY7LzR1X5fzxl/486a347031c530961a7e22e0796fdf00/image7-6.png" />
            
            </figure><p>This interplay between zone level settings and Configuration Rules allows users to selectively enable features, allowing them to test Rocket Loader on <code>staging.example.com</code> prior to flipping the zone-level toggle.</p><p>With Configuration Rules, users also have access to various other non-URL related fields. For example, users could use the <code>ip.geoip.country</code> <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">field</a> to ensure that visitors for specific countries always have the ‘Security Level’ set to ‘I’m under attack’.</p><p>Historically, these configuration overrides were achieved with the setting of a <a href="https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-">Page Rule</a>.</p><p>Page Rules is the ‘If This Then That’ of Cloudflare. Where the ‘If…’ is a URL, and the ‘Then That’ is changing how we handle traffic to specific parts of a ‘zone’. It allows users to selectively change how traffic is handled, and in this case specifically, which settings are and aren’t applied. It is very well adopted, with over one million Page Rules in the past three months alone.</p><p>Page Rules, however, are limited to performing actions based upon the requested URL. This means if users want to disable Rocket Loader for certain traffic, they need to make that decision based on the URL alone. This can be challenging for users who may want to perform this decision-making on more nuanced aspects, like the user agent of the visitor or on the presence of a specific cookie.</p><p>For example, users might want to set the ‘Security Level’ to ‘I'm under attack’ when the HTTP request originates in certain countries. This is where Configuration Rules help.</p>
    <div>
      <h3>Use case: A/B testing</h3>
      <a href="#use-case-a-b-testing">
        
      </a>
    </div>
    <p>A/B testing is the term used to describe the comparison of two versions of a single website or application. It allows users to create a copy of their current website (‘A’), change it (‘B’) and compare the difference.</p><p>In a Cloudflare context, users might want to A/B test the effect of features such as Mirage or Polish prior to enabling them for all traffic to the website. With Page Rules, this was impractical. Users would have to create Page Rules matching on specific URI query strings and A/B test by appending those query strings to every HTTP request.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4sDX4fz5R0yYVwYjGOHqIR/b3c74589103361deb70e6b41d03c4b5d/image2-51.png" />
            
            </figure><p>With Configuration Rules, this task is much simpler. Leveraging one or more <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">fields</a>, users can filter on other parameters of a HTTP request to define which features and products to enable.</p><p>For example, by using the expression <code>any(http.request.cookies["app"][*] == "test")</code> a user can ensure that Auto Minify, Mirage and Polish are enabled only when this cookie is present on the HTTP request. This allows comparison testing to happen before enabling these products either globally, or on a wider set of traffic. All without impacting existing production traffic.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7xSw4yjv18WugHyW3FFUBD/0a8cd5a53cbef56107e4d1b33fdff2d6/image4-18.png" />
            
            </figure>
    <div>
      <h3>Use case: augmenting URLs</h3>
      <a href="#use-case-augmenting-urls">
        
      </a>
    </div>
    <p>Configuration Rules can be used to augment existing requirements, also. One example given in <a href="/future-of-page-rules">‘The Future of Page Rules’</a> blog is increasing the Security Level to ‘High’ for visitors trying to access the contact page of a website, to reduce the number of malicious visitors to that page.</p><p>In Page Rules, this would be done by simply specifying the contact page URL and specifying the security level, e.g. URL: <code>example.com/contact*</code>. This ensures that any “visitors that exhibit threatening behavior within the last 14 days” are served with a challenge prior to having that page load.</p><p>Configuration Rules can take this use case and augment it with additional fields, such as whether the source IP address is in a Cloudflare <a href="https://developers.cloudflare.com/firewall/cf-firewall-rules/rules-lists/#managed-ip-lists">Managed IP List</a>. This allows users to be more specific about when the security level is changed to ‘High’, such as only when the request <i>also</i> is marged as coming from an open HTTP and SOCKS proxy endpoints, which are frequently used to launch attacks and hide attackers identity:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/gTfYrqfIMypitpU8oxngo/ac7f71dd2ad2bac606b87635efd9158f/image3-35.png" />
            
            </figure><p>This reduces the chance of a false positive, and a genuine visitor to the contact form being served with a challenge.</p>
    <div>
      <h3>Try it now</h3>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>Configuration Rules are available <a href="https://dash.cloudflare.com/?to=/:account/:zone/rules/">now</a> via API, UI, and Terraform for <a href="https://www.cloudflare.com/plans/">all Cloudflare plans</a>! We are excited to see how you will use them in conjunction with all our new rules releases from this week.</p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Config Rules]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">TYoO5u2nlYXlMN2YAvsrL</guid>
            <dc:creator>Matt Bullock</dc:creator>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Managed Transforms: templated HTTP header modifications]]></title>
            <link>https://blog.cloudflare.com/managed-transforms-templated-http-header-modifications/</link>
            <pubDate>Thu, 30 Jun 2022 12:55:19 GMT</pubDate>
            <description><![CDATA[ Customize multiple HTTP headers with a single click using Cloudflare Managed Transforms ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/ndVg7s51Dv7zOnnNhAKd0/3f6f5c93e8985562fdba352c73325d0b/image5-19.png" />
            
            </figure><p><b>Managed Transforms</b> is the next step on a journey to make HTTP header modification a trivial task for our customers. In early 2021 the only way for Cloudflare customers to modify HTTP headers was by writing a <a href="https://workers.cloudflare.com/">Cloudflare Worker</a>. We heard from numerous customers who wanted a simpler way.</p><p>In <a href="/transform-http-request-headers/">June 2021</a> we introduced Transform Rules, giving customers a simple UI letting them specify what the custom HTTP header’s name and value is—either a static string (i.e. <code>X-My-CDN: Cloudflare</code>) or a dynamically populated value (i.e. <code>X-Bot-Score: cf.bot_management.score</code>).</p><p>This made the job much simpler, however there is still a good amount of thought required—with a number of potential drop-off points on the user journey. For example, in order to dynamically populate the bot score into the value of an HTTP request header, the user needs to know the correct <a href="https://developers.cloudflare.com/ruleset-engine/rules-language/fields">field name</a>. To find that they'll need to go to the documentation site, find the correct section, etc.</p><p>When we analyzed how our customers use Transform Rules we found a set of very common use cases in the data. Four of the top eight fields used were relating to bot management; customers wanting to have the bot score, JA3 hash, etc. of each request added as an HTTP header. A further three of the top 10 fields were relating to the geographic location of the visitor (their city, country and ASN). We also saw over 400 Transform Rules being used just to remove <code>X-Powered-By</code>. That means potentially 400 users went to the same part of the dashboard, typed the same header name, read the same documentation and selected the same action.</p><p>Much as we set out to productize the common Cloudflare Worker use case of HTTP header modification into Transform Rules, we have now set out to productize and further simplify the common Transform Rules use cases into Managed Transforms.</p><p>The intention is to continue to identify common reasons for use of a Transform Rule and where possible package them up into a single click solution.</p><p>We always want to make our user’s lives as easy as possible, and finding a way to stop hundreds of people typing the same thing and clicking the same buttons, to achieve the exact same outcome, seems a great way to continue that mission.</p>
    <div>
      <h3>An even simpler solution</h3>
      <a href="#an-even-simpler-solution">
        
      </a>
    </div>
    <p><b>Managed Transforms</b> is a dedicated section of Transform Rules offering one-click HTTP header modifications. Want to add relevant Cloudflare <a href="https://www.cloudflare.com/products/bot-management/">Bot Management</a> information as custom HTTP headers? One click. Want to add geographic information (country, etc.) as custom HTTP headers? One click.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5G4giWNwJPxzcxp53QQzap/920a04eb6c82f1c66d7ab87678093c42/image4-28.png" />
            
            </figure><p>Managed Transforms can be found in 'Rules &gt; Transform Rules' and clicking on the 'Managed Transforms' button. To benefit from Managed Transforms, users simply toggle the appropriate settings, and we take care of the rest.</p><p>For example, to enrich every HTTP request with Cloudflare’s <a href="https://www.cloudflare.com/products/bot-management/">Bot Management</a> information users would enable ‘Add bot protection headers’. This setting ensures we add <a href="https://developers.cloudflare.com/rules/transform/managed-transforms/reference/">four new HTTP request headers</a> to <i>every</i> HTTP request. SIEM (Security Information and Event Management) products can then be configured to correctly collect and chart these new headers, allowing customers to see the bot score of every HTTP request, how many requests are coming from verified bots, and so on.</p><p>Another great use case is the ‘Add security headers’ toggle. On a completely standard, default zone, a user can improve their website's <a href="https://securityheaders.com/">security score</a> from an F to a C in <b>just one click</b>. Enabling HSTS improves the score to a B (<i>scores correct as of June 7, 2022</i>).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5HpdOezo4M1j4KVd0gZ8Co/2eabf00940841a2aa4f6821a66df771e/image3-35.png" />
            
            </figure><p>Adding a Content-Security-Policy (used to <a href="https://www.cloudflare.com/learning/security/how-to-prevent-xss-attacks/">mitigate Cross-Site Scripting (‘XSS’) attacks</a>) or a Permission-Policy (used to give websites the ability to allow or block the use of browser features) increases the score to an ‘A’; the addition of both improves the score to the maximum: A+.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3M5FV3sWJnaHx2ScPkPLGW/7676a7a95929413e4d52e01361010fd0/image1-58.png" />
            
            </figure><p>During the design of Managed Transforms we chose not to include default Content-Security-Policy and Permission-Policy HTTP response headers within the ‘Add security headers’ toggle as we found these particular headers to be very specific to each individual website. Any default policies we tried either caused incorrect loading of the website content, or were too open to be of any value. So we decided to remove them from scope.</p><p>However, users can still add these HTTP response headers and their appropriate values in a handful of clicks by creating a new Transform Rule:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/zORZ4ooIorzZopWSuOBWk/2b26e8e37498603141138fd07cdadfbd/image2-50.png" />
            
            </figure><p>The HTTP response headers entered here will be added alongside the HTTP response headers added by Managed Transforms to give an A+ score.</p>
    <div>
      <h3>Try it now</h3>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>Managed Transforms can be used to improve operations, remove sensitive data, and increase security, amongst other common use cases.</p><p>Try out <a href="https://dash.cloudflare.com/?to=/:account/:zone/rules/transform-rules">Managed Transforms</a> yourself today.</p><p>...<i>We protect </i><a href="https://www.cloudflare.com/network-services/"><i>entire corporate networks</i></a><i>, help customers build </i><a href="https://workers.cloudflare.com/"><i>Internet-scale applications efficiently</i></a><i>, accelerate any </i><a href="https://www.cloudflare.com/performance/accelerate-internet-applications/"><i>website or Internet application</i></a><i>, ward off </i><a href="https://www.cloudflare.com/ddos/"><i>DDoS attacks</i></a><i>, keep </i><a href="https://www.cloudflare.com/application-security/"><i>hackers at bay</i></a><i>, and can help you on </i><a href="https://www.cloudflare.com/products/zero-trust/"><i>your journey to Zero Trust</i></a><i>.</i></p><p><i>Visit </i><a href="https://1.1.1.1/"><i>1.1.1.1</i></a><i> from any device to get started with our free app that makes your Internet faster and safer.To learn more about our mission to help build a better Internet, start </i><a href="https://www.cloudflare.com/learning/what-is-cloudflare/"><i>here</i></a><i>. If you’re looking for a new career direction, check out </i><a href="http://cloudflare.com/careers"><i>our open positions</i></a><i>.</i></p> ]]></content:encoded>
            <category><![CDATA[Transform Rules]]></category>
            <guid isPermaLink="false">6YEMr7635QkaWejfbVFZsT</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Maximum redirects, minimum effort: Announcing Bulk Redirects]]></title>
            <link>https://blog.cloudflare.com/maximum-redirects-minimum-effort-announcing-bulk-redirects/</link>
            <pubDate>Mon, 13 Dec 2021 13:57:23 GMT</pubDate>
            <description><![CDATA[ Bulk Redirects is a new product that allows an administrator to upload and enable hundreds of thousands of URL redirects within minutes, without having to write a single line of code. ]]></description>
            <content:encoded><![CDATA[ <p></p>
    <div>
      <h3>404: Not Found</h3>
      <a href="#404-not-found">
        
      </a>
    </div>
    <p>The Internet is a dynamic place. Websites are constantly changing as technologies and business practices evolve. What was front-page news is quickly moved into a <a href="https://blog.cloudflare.com/subdomains-vs-subdirectories-best-practices-workers-part-1/">sub-directory</a>. To ensure website visitors continue to see the correct webpage even if it has been moved, administrators often implement <i>URL redirects.</i></p><p>A URL redirect is a mapping from one location on the Internet to another, effectively telling the visitor's browser that the location of the page has changed, and where they can now find it. This is achieved by providing a virtual ‘link’ between the content’s original and new location.</p><p>URL Redirects have typically been implemented as <a href="https://www.cloudflare.com/features-page-rules/">Page Rules</a> within Cloudflare, up to a maximum of 125 URL redirects per zone. This limitation meant customers with a need for more URL redirects had to implement alternative solutions such <a href="https://workers.cloudflare.com/">Cloudflare Workers</a> to achieve their goals.</p><p>To simplify the management and implementation of URL redirects at scale we have created <b>Bulk Redirects</b><i>.</i> Bulk Redirects is a new product that allows an administrator to upload and enable hundreds of thousands of URL redirects within minutes, without having to write a single line of code.</p>
    <div>
      <h3>We’ve moved!</h3>
      <a href="#weve-moved">
        
      </a>
    </div>
    <p>Mail forwarding is a product offered by postal services such as <a href="https://www.usps.com/manage/forward.htm">USPS</a> and <a href="https://www.royalmail.com/d8/help/redirection">Royal Mail</a> that allows you to continue to receive letters and parcels even if they are sent to an address where you no longer reside.</p><p>The postal services achieve this by effectively maintaining a register of your new location and your old location. This allows the systems to detect ‘<i>this letter is for Sam Marsh at address A, but he now lives at address B, therefore send the mail there’</i>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/44gSIkRcm0aLeOwYo9Kcs5/72d8227f42e64d348220f36033e31008/image1-41.png" />
            
            </figure><p>Photo by <a href="https://unsplash.com/@christianlue?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Christian Lue</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p><p>This problem can be solved by manually updating my bank, online shops, etc. and having them send the parcels and letters directly to my new address. However, that assumes I know of every person and business who has my address. And it also relies on those people to remember I moved address and make updates on their side. For example, Grandma Marsh might have forgotten about my new address — I’ve moved a lot — and she may send my birthday card to my old address. Or all those Christmas cards from people who I don't speak with regularly. Those will go to my old address also.  To solve this, I can use mail forwarding to ensure I still receive my cards and other mail, even though I no longer live at that address.</p><p>URL redirects are the Internet equivalent of mail forwarding.</p><p>URL redirects are effectively a table with two columns; what traffic am I looking <i>for,</i> and where should I send that traffic <i>to</i>? This mapping allows an administrator to define "<i>whenever visitors go to</i> <code>_[https://www.cloudflare.com/bots](https://www.cloudflare.com/bots)_</code> <i>I want to redirect them to the new location</i> <code>_[https://www.cloudflare.com/pg-lp/bot-mitigation-fight-mode](https://www.cloudflare.com/pg-lp/bot-mitigation-fight-mode)_</code><i>"</i>.</p><p>With this technology, our sales and marketing teams can use the vanity URL all across the Internet, safe in the knowledge that should the backend systems change they won’t need to go to all the places this URL has been posted and update it. Instead, the intermediary system that handles the URL redirects can be updated. One location. Not thousands.</p>
    <div>
      <h3>Why use URL redirects?</h3>
      <a href="#why-use-url-redirects">
        
      </a>
    </div>
    <p>URL redirects are used to solve a number of use cases. One such common use case is to use URL redirects to force all visitors to connect to the website over a secure HTTPS connection, instead of via plain HTTP, to improve <b>security</b>. It's such a common use case we created a <a href="https://developers.cloudflare.com/ssl/edge-certificates/additional-options/always-use-https">toggle</a> in the Cloudflare dashboard, “Always use HTTPS”, which redirects all HTTP requests to HTTPS when enabled.</p><p>URL redirects are also used for <b>vanity domains and hyperlinks.</b> In these scenarios, URL redirects are deployed to provide a mapping of short, user-friendly URLs to long, server-friendly URLs.  Not only are shorter URLs more memorable, but they are better scoring from an SEO perspective. According to <a href="https://backlinko.com/google-ranking-factors">Backlinko</a>, ‘<i>Excessively long URLs may hurt a page’s search engine visibility. In fact, several industry studies have found that short URLs tend to have a slight edge in Google’s search results.</i>’.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6QGzJwjtfAK6IVmMfY6nc5/9e96cf71234fe4aba303dce6a1b36577/image5-17.png" />
            
            </figure><p>Photo by <a href="https://unsplash.com/@halacious?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Hal Gatewood</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p><p>Another use case is where a company may have a local domain for each of their markets, which they want to redirect back to the main website, e.g., redirect <code>www.example.fr</code> and <code>www.example.de</code> to <code>www.example.com/eu/fr</code> and <code>www.example.com/eu/de</code>, respectively.</p><p>This also covers <b>company acquisition</b>, where a company is acquired and the acquiring company wants to redirect hyperlinks to the relevant pages on their own website, e.g., redirect <code>www.example.com</code> to <code>www.companyB.com/portfolio/example</code>.</p><p>Finally, one of the most common use cases for URL redirects is to maintain uptime during a <b>website migration.</b> As companies migrate their websites from one platform to another, or one domain to another, URL redirects ensure visitors continue to see the correct content. Without these URL redirects, hyperlinks in emails, blogs, marketing brochures, etc. would fail to load, potentially costing the business revenue in lost sales and brand damage. For example, <code>www.example.com/products/golf/product-goes-here</code> would redirect to the new website at <code>products.example.com/golf/product-goes-here</code>.</p>
    <div>
      <h3>How are URL redirects implemented today?</h3>
      <a href="#how-are-url-redirects-implemented-today">
        
      </a>
    </div>
    <p>Ensuring these URL redirects are executed correctly is often the job of the reverse proxy — a server which sits between the client and the origin whose job is, amongst many others, to re-route received traffic to the correct destination.</p><p>For example, when using NGINX, a <a href="https://w3techs.com/technologies/overview/web_server">popular</a> web server, the administrator would have a line in the config similar to the one below to implement a URL redirect:</p>
            <pre><code>`rewrite ^/oldpage$ http://www.example.com/newpage permanent;`</code></pre>
            <p>Historically, these web servers were located physically within a company's data center. Administrators then had full control over the URLs received, and could create the redirect rules as and when needed.</p><p>As the world rapidly migrates on-premise applications and solutions to the cloud, administrators can find themselves in a situation where they can no longer do what they previously could. Not being responsible for the origin has a number of benefits, but it also comes with drawbacks such as lack of ‘control’. Previously, an administrator could quickly add a few config lines to the web server in front of their ecommerce platform. Moving to an online hosted platform makes this much more difficult to do.</p><p>As such, administrators have moved to platforms like Cloudflare where functionality such as URL redirects can be implemented in the cloud without the need to have administrator access to the origin.</p><p>The first way to implement a URL Redirect in Cloudflare is via a <a href="https://support.cloudflare.com/hc/en-us/articles/200172286-Configuring-URL-forwarding-or-redirects-with-Cloudflare-Page-Rules">Forwarding URL</a> Page Rule. Users can create a Page Rule which matches on a specific URL and redirects matching traffic to another specific URL, along with a status code — either a permanent redirect (301) or a temporary redirect (302):</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4rj1gaWkXtETmH8rMMMHWN/ebeb1b15c2d448fcd56bf41b708e5394/image6-10.png" />
            
            </figure><p>Another method is to use Cloudflare Workers to implement URL redirects, either individually or as a map. For example, the code below is used to create a URL redirect map which runs when the Worker is invoked:</p>
            <pre><code>const redirectMap = new Map([
 ["/bulk1", "https://" + externalHostname + "/redirect2"],
 ["/bulk2", "https://" + externalHostname + "/redirect3"],
 ["/bulk3", "https://" + externalHostname + "/redirect4"],
 ["/bulk4", "https://google.com"],
])</code></pre>
            <p>This <a href="https://developers.cloudflare.com/workers/examples/bulk-redirects">snippet</a> is taken from the Cloudflare Workers examples library and can be used to scale beyond the 125 URL redirect limit of Page Rules. However, it does require the administrator to be comfortable working with code and correctly configuring their Cloudflare Workers.</p>
    <div>
      <h3>Introducing: Bulk Redirects</h3>
      <a href="#introducing-bulk-redirects">
        
      </a>
    </div>
    <p>Speaking with Cloudflare users about URL redirects and their experience with our product offerings, “<i>Give me a product which lets me upload thousands of URL redirects to Cloudflare via a GUI”</i> was a very common request. Customers we interviewed typically wanted a simple way to upload a list of ‘from,to,response code’ without having to write a single line of code. And that's what we are announcing today.</p><p><b>Bulk Redirects</b> is now available for all Cloudflare plans. It is an account/organization-level product capable of supporting hundreds of thousands of URL redirects, all configured via the dashboard without having to write a single line of code.</p><p>The system is implemented in two parts. The first part is the Bulk Redirect <i>List</i>. This is effectively the redirect map, or ‘edge dictionary’, where users can upload their URL redirects:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5QhgGqiHUqVRe2VSia5EKD/a70f6b3b570fe5918b7d3edbd89dccbb/image7-4.png" />
            
            </figure><p>Each URL redirect within the list contains three main elements. The first two elements are <b>Source URL</b> (the URL we are looking for) and <b>Target</b> <b>URL</b> (the URL we are going to redirect matching traffic to).</p><p>There is also the <b>Status code.</b> This is the ‘type’ of redirect. In addition to 301 (Moved Permanently) and 302 (Moved Temporarily) redirects, we have added support for the newer <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307">307 (Temporary Redirect)</a> and <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308">308 (Permanent Redirect)</a> redirect status codes.</p><p>We have added support for specifying destination ports within the <b>Target URL</b> field also, allowing URL redirects to non-standard ports, e.g., “<b>Target URL</b>: <code>www.example.com:8443</code>”.</p><p>If you have many URL redirects, you can upload them via a CSV file.</p><p>There are also four additional parameters available for each individual URL redirect.</p><p>Firstly, we have added two options to replace the ambiguity and confusion caused by the use of asterisks as wildcards. Take this source URL as an example: <code>*.example.com/a/b</code>. Would you expect <code>www.example.com/a/b</code> to match? How about <code>example.com/a/b</code>, or <code>www.example.com/path*</code>? Asterisks used as wildcards cause confusion and misunderstanding, and also increase the cost of implementation and maintenance from an engineering perspective. Therefore, we are not implementing them in Bulk Redirects.</p><p>Instead, we have added two discrete options: <b>Include subdomains</b> and <b>Subpath matching.</b> The <b>Include subdomains</b> option, once enabled, will match all subdomains to the left of the domain portion of the URL as well as the domain specified. For example, if there is a URL redirect with a source URL of <code>example.com/a</code> then traffic to <code>b.example.com/a</code> and <code>c.b.example.com/a</code> will also be redirected.</p><p>The <b>Subpath matching</b> option focuses on the opposite end of the URL. If this option is enabled, the redirect applies to the URL as well as all its subpaths. For example, if we have a URL redirect on <code>www.example.com/foo</code> with subpath matching enabled, we will match on that specific URL as well as all subpaths, e.g., <code>www.example.com/foo/a</code>, <code>www.example.com/foo/a/</code>, ` <a href="http://www.example.com/foo/a/b/c\`">www.example.com/foo/a/b/c\`</a>, etc., but not <code>www.example.com/foobar</code>.</p><p>These options provide a tremendous amount of flexibility and granularity for each URL redirect. However, for most use cases only the source URL, target URL, and status code options will need to be set.</p><p>Secondly, we have added two options relating to retaining portions of the original HTTP request: <b>Preserve path suffix</b> and <b>Preserve query string</b>. If subpath matching is enabled, <b>Preserve path suffix</b> can be used to copy the URI path from the originally requested URL and add it to the destination URL. For example, if there is a URL redirect of <b>Source URL</b>: <code>example.co.uk</code>, <b>Target URL</b>: <code>www.example.com/a</code>, then requests to <code>example.co.uk/target</code> will be redirected to <code>www.example.com/a/target</code> with both options enabled. <b>Preserve query string</b> can be used independently of the other options, and carries forward the URI query from the originally requested URL to the new URL.</p><p>Lists by themselves do not provide any redirection, they are simply the ‘lookup table’. To enable them we need to reference them via a <b>Bulk Redirect Rule</b>.</p><p>The rules themselves are very simple. By default, the user experience is to provide a name for the rule, a description, and select the Bulk Redirect List that should be invoked.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4ba3Bql0mmmXQJZuq0t7r1/b8b62726e855550a48f3ab50b77d1401/image2-23.png" />
            
            </figure><p>For users who require more granularity and control there are additional settings available under the <b>Advanced options</b> toggle. Within this section there are two editable sections:  <b>Expression</b> and <b>Key</b>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2PmH9DnTDGhYp5RHFwHRkZ/fd9409755f3c6b8197eeab0f9870eacd/unnamed-9.png" />
            
            </figure><p>The first field, <b>Expression</b>, specifies the conditions that must be met in order for the rule to run. By default, all URL redirects of the specified list will apply.</p><p>The second field, <b>Key</b>, is closely related to the expression. The key is used in combination with the specified list to select the URL redirect to apply. The field used for the key should <i>always</i> be the same as the field used in the expression, i.e., the key should be <code>http.request.full_uri</code> if the field in the expression is <code>http.request.full_uri</code>, or conversely, the key should be <code>raw.http.request.full_uri</code> if the field in the expression is <code>raw.http.request.full_uri</code>.</p><p>There are two main use cases for modifying these settings. Firstly, users can edit these options to increase specificity in the trigger, e.g., <code>ip.src.country == "GB" and http.request.full_uri in $redirect_list</code>. This is useful for ensuring Bulk Redirect Lists are only applied when a visitor comes from specific countries, subnets, or ASNs — or also only applying a URL redirect list if the visitor is a verified bot, or the bot score is &gt;35.</p><p>Secondly, users can edit these options to amend the URL being matched and used as a lookup in the given list, i.e., the user may choose to have URL redirects in their list(s) specifically for URLs that would be <a href="https://developers.cloudflare.com/rules/normalization">normalized</a>, e.g., URLs containing specific percent-encoding.  To ensure these URL redirects still trigger, the settings in <b>Advanced options</b> should be used to edit the expression and key to use the <code>raw.http.request.full_uri</code> field instead.</p>
    <div>
      <h3>Automating via the API</h3>
      <a href="#automating-via-the-api">
        
      </a>
    </div>
    <p>Another way to manage bulk redirects is via our API. Customers wishing to automate the addition of bulk redirects can use the API to either simply add URL redirects to an existing list, or automate the entire workflow — creating a list, adding URL redirects to the list, and enabling the list via a new redirect rule.</p><p>There are three main calls when creating bulk redirects via the API:</p><ol><li><p>Create the redirect list</p></li><li><p>Load with URL redirects</p></li><li><p>Enable via a rule (You will also need to create the ruleset if doing this for the first time).</p></li></ol><p>For step 1, first create a mass redirect list via the API call:</p>
            <pre><code>curl --location --request POST 'https://api.cloudflare.com/client/v4/accounts/&lt;ACCOUNT_ID&gt;/rules/lists' \
--header 'X-Auth-Email: &lt;EMAIL_ADDRESS&gt;' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Key: &lt;API_KEY&gt;' \
--data-raw '{
 "name": "my_redirect_list_2",
 "description": "My redirect list 2",
 "kind": "redirect"
}'</code></pre>
            <p>The output will look similar to:</p>
            <pre><code>{
  "result": {
    "id": "499b94da726d4dbc9ce6bf6c96ef8b6a",
    "name": "my_redirect_list_2",
    "description": "My redirect list 2",
    "kind": "redirect",
    "num_items": 0,
    "num_referencing_filters": 0,
    "created_on": "2021-12-04T06:43:43Z",
    "modified_on": "2021-12-04T06:43:43Z"
  },
  "success": true,
  "errors": [],
  "messages": []
}</code></pre>
            <p>Capture the value of “id”, as this is the list ID we will then add URL redirects to.</p><p>Next, in step 2 we will add URL redirects to our newly created list by executing a POST call to the ID we captured previously - with our URL redirects in the body:</p>
            <pre><code>curl --location --request POST 'https://api.cloudflare.com/client/v4/accounts/&lt;ACCOUNT_ID&gt;/rules/lists/&lt;LIST_ID&gt;/items' \
--header 'X-Auth-Email: &lt;EMAIL_ADDRESS&gt;' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Key: &lt;API_KEY&gt;' \
--data-raw '[
 {
   "redirect": {
     "source_url": "www.example.com/a",
     "target_url": "https://www.example.net/a"
   }
 },
 {
   "redirect": {
     "source_url": "www.example.com/b",
     "target_url": "https://www.example.net/a/b",
     "status_code": 307,
     "include_subdomains": true
   }
 },
 {
   "redirect": {
     "source_url": "www.example.com/c",
     "target_url": "www.example.net/c",
     "status_code": 307,
     "include_subdomains": true
   }   
 }
]'</code></pre>
            <p>The output will look similar to:</p>
            <pre><code>{
  "result": {
    "operation_id": "491ab6411acf4a12a6c72df1385b095a"
  },
  "success": true,
  "errors": [],
  "messages": []
}</code></pre>
            <p>In step 3 we enable this list by creating a new mass redirect rule within the mass redirect account-level ruleset.</p><p><b>Note</b>, if this is the first time you are creating a redirect rule you will need to use a different API call to create the ruleset. See the documentation <a href="https://developers.cloudflare.com/rules/bulk-redirects/create-api">here</a> for more details. All subsequent updates to the rulesets are made by calls similar to below.</p><p>Firstly, we need to find our account-level rulesets ID. To do this we need to get a list of all account-level rulesets and look for the ruleset with the phase <code>http_request_redirect</code>:</p>
            <pre><code>curl --location --request GET 'https://api.cloudflare.com/client/v4/accounts/&lt;ACCOUNT_ID&gt;/rulesets \
--header 'X-Auth-Email: &lt;EMAIL_ADDRESS&gt;' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Key: &lt;API_KEY&gt;'</code></pre>
            <p>The output will look similar to:</p>
            <pre><code>{
   "result": [
       {
           "id": "efb7b8c949ac4650a09736fc376e9aee",
           "name": "Cloudflare Managed Ruleset",
           "description": "Created by the Cloudflare security team, this ruleset is designed to provide fast and effective protection for all your applications. It is frequently updated to cover new vulnerabilities and reduce false positives.",
           "source": "firewall_managed",
           "kind": "managed",
           "version": "34",
           "last_updated": "2021-10-25T18:33:27.512161Z",
           "phase": "http_request_firewall_managed"
       },
       {
           "id": "4814384a9e5d4991b9815dcfc25d2f1f",
           "name": "Cloudflare OWASP Core Ruleset",
           "description": "Cloudflare's implementation of the Open Web Application Security Project (OWASP) ModSecurity Core Rule Set. We routinely monitor for updates from OWASP based on the latest version available from the official code repository",
           "source": "firewall_managed",
           "kind": "managed",
           "version": "33",
           "last_updated": "2021-10-25T18:33:29.023088Z",
           "phase": "http_request_firewall_managed"
       },
       {
           "id": "5ff4477e596448749d67da859230ac3d",
           "name": "My redirect ruleset",
           "description": "",
           "kind": "root",
           "version": "1",
           "last_updated": "2021-12-04T06:32:58.058744Z",
           "phase": "http_request_redirect"
       }
   ],
   "success": true,
   "errors": [],
   "messages": []
}</code></pre>
            <p>Our redirect ruleset is at the bottom of the output. Next we will add our new bulk redirect rule to this ruleset:</p>
            <pre><code>curl --location --request PUT 'https://api.cloudflare.com/client/v4/accounts/&lt;ACCOUNT_ID&gt;/rulesets/&lt;RULESET_ID&gt; \
--header 'X-Auth-Email: &lt;EMAIL_ADDRESS&gt;' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Key: &lt;API_KEY&gt; \
--data-raw '{
     "rules": [
   {
     "expression": "http.request.full_uri in $my_redirect_list",
     "description": "Bulk Redirect rule 2",
     "action": "redirect",
     "action_parameters": {
       "from_list": {
         "name": "my_redirect_list_2",
         "key": "http.request.full_uri"
       }
     }
   }
 ]
}'</code></pre>
            <p>The output will look similar to:</p>
            <pre><code>{
  "result": {
    "id": "5ff4477e596448749d67da859230ac3d",
    "name": "My redirect ruleset",
    "description": "",
    "kind": "root",
    "version": "2",
    "rules": [
      {
        "id": "615cf6ac24c04f439138fdc16bd20535",
        "version": "1",
        "action": "redirect",
        "action_parameters": {
          "from_list": {
            "name": "my_redirect_list_2",
            "key": "http.request.full_uri"
          }
        },
        "expression": "http.request.full_uri in $my_redirect_list",
        "description": "Bulk Redirect rule 2",
        "last_updated": "2021-12-04T07:04:16.701379Z",
        "ref": "615cf6ac24c04f439138fdc16bd20535",
        "enabled": true
      }
    ],
    "last_updated": "2021-12-04T07:04:16.701379Z",
    "phase": "http_request_redirect"
  },
  "success": true,
  "errors": [],
  "messages": []
}</code></pre>
            <p>With those API calls executed, our new list is created, loaded with URL redirects and enabled by the bulk redirect rule. Visitors to the URLs specified in our list will now be redirected appropriately.</p>
    <div>
      <h3>Account-level benefits</h3>
      <a href="#account-level-benefits">
        
      </a>
    </div>
    <p>One of the driving forces behind this product is the desire to make life easier for those customers with a large number of zones on Cloudflare. For these customers, URL redirects are a pain point when using Page Rules, as they need to navigate into each zone and configure URL redirects one at a time. This doesn't scale very well.</p><p>Bulk Redirects add real value for customers in this situation. Instead of having to navigate into 400 zones and create one or two Page Rules for each, an administrator can now create and upload a single Bulk Redirect List, which contains all the URL redirects for the zones under management.</p><p>This means that if the customer simply wants 399 of those 400 zones to redirect to the "primary zone", they can create a bulk redirect list with 399 entries, all pointing to <code>example.com</code>, and enable the <b>Subpath matching</b> and <b>Include subdomains</b> options on each. This vastly simplifies the management of the estate.</p><p>The same premise also applies to <a href="https://www.cloudflare.com/ssl-for-saas-providers/">SSL for SaaS</a> customers. For example, if <code>example.com</code> has 20 custom hostnames in their zone, customers can now create a Bulk Redirect List and Rule for each custom hostname, grouping each customer’s URL redirects into their own logical buckets.</p><p>Bulk Redirects is a game changer for companies with a large number of zones and customers under management.</p>
    <div>
      <h3>Allowances</h3>
      <a href="#allowances">
        
      </a>
    </div>
    <p>Bulk Redirects are available for all accounts. The packaging model for Bulk Redirects closely resembles that of “<a href="https://developers.cloudflare.com/firewall/cf-firewall-rules/rules-lists#entitlements">IP Lists</a>”. Accounts are entitled to a set number of Edge Rules (from which “Bulk Redirect Rules” draws down), Bulk Redirect Lists, and URL Redirects depending on the <i>highest</i> Cloudflare plan within their account.</p><table><tr><td><p><b>Feature</b></p></td><td><p><b>Enterprise</b></p></td><td><p><b>Business</b></p></td><td><p><b>Pro</b></p></td><td><p><b>Free</b></p></td></tr><tr><td><p>Edge Rules (for use of Bulk Redirect Rules)</p></td><td><p>50+</p></td><td><p>15</p></td><td><p>15</p></td><td><p>15</p></td></tr><tr><td><p>Bulk Redirect Lists</p></td><td><p>25+</p></td><td><p>5</p></td><td><p>5</p></td><td><p>5</p></td></tr><tr><td><p>URL Redirects</p></td><td><p>10,000+</p></td><td><p>500</p></td><td><p>500</p></td><td><p>20</p></td></tr></table><p>For example, an account with ten zones, all on the <a href="https://www.cloudflare.com/plans/free/">Free plan</a>, would be entitled to 15 Edge Rules, 5 Bulk Redirect Lists, and 20 URL Redirects that can be stored within those lists.</p><p>An account with one Pro zone and 2 Free plan zones would be entitled to 15 Edge Rules, 5 Bulk Redirect Lists, and 500 URL Redirects that can be stored within those lists.</p><p>Enterprise customers have a default of 10,000 URL Redirects to be used across 25 lists. However, these numbers are negotiable on enquiry.</p>
    <div>
      <h3>Planned enhancements</h3>
      <a href="#planned-enhancements">
        
      </a>
    </div>
    <p>We intend to make a number of incremental improvements to the product in the coming months, specifically to the list experience to allow for the editing of URL redirects and also for searching within lists.</p><p>In the near future we intend to bring to market a product to fulfill the other common request for URL redirects, and deliver ‘Dynamic URL Redirects’. Whilst Bulk Redirects supports hundreds of thousands of URL redirects, those URL redirects are relatively prescriptive — from <code>a.com/b</code> to <code>b.com/a</code>, for example.  There is still a requirement for supporting more complex, rich URL redirects, e.g., device-specific URL redirects, country-specific URL redirects, URL redirects that allow regular expressions in their target URL, and so forth. We aspire to offer a full range of functionality to support as many use cases as possible.</p>
    <div>
      <h3>Try it now</h3>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>Bulk Redirects can be used to improve operations, simplify complex configurations, and ease website management, amongst many other use cases.  Try out <a href="https://dash.cloudflare.com/">Bulk Redirects</a> yourself today.</p> ]]></content:encoded>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Page Rules]]></category>
            <category><![CDATA[API]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">2DrdRUVIhDWw8W6EKVlQHL</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Modifying HTTP response headers with Transform Rules]]></title>
            <link>https://blog.cloudflare.com/transform-http-response-headers/</link>
            <pubDate>Thu, 18 Nov 2021 14:00:02 GMT</pubDate>
            <description><![CDATA[ HTTP response headers can now be modified with Cloudflare Transform Rules. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>HTTP headers are central to how the web works. They are used for passing additional information between the client and server, such as which security permissions to apply and information about the client, allowing the correct content to be served.</p><p>Today we are announcing the immediate availability of the third action within Transform Rules, “HTTP Response Header Modification”, available for all Cloudflare plans. This new functionality provides Cloudflare users the ability to set or remove HTTP response headers as traffic returns through Cloudflare back to the client. This allows customers to enrich responses with information about how their request was handled, debugging information and even <a href="https://frenxi.com/http-headers-you-dont-expect/">recruitment messages</a>.</p><p>Previously, HTTP response header modification was done using a <a href="https://workers.cloudflare.com/">Cloudflare Worker</a>. Today we’re introducing an easier way to do this without writing a single line of code.</p>
    <div>
      <h3>Luggage tags of the World Wide Web</h3>
      <a href="#luggage-tags-of-the-world-wide-web">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/12mADL32rqDAMHBIglhf3u/4c7f369ab4ffc00390d455f672332a9b/image4-14.png" />
            
            </figure><p>Think of HTTP headers as the “luggage tag” attached to your bags when you check in at the airport.</p><p>Generally, you don't need to know what those numbers and words mean. You just know they are important in getting your suitcase from the boarding desk, to the correct airplane, and back to the correct luggage carousel at your destination.</p><p>These tags contain information about the weight of the suitcase, the destination airport code, baggage tag number, airline carrier, customs handling information, and more. These attributes are all essential, not only for ensuring that your luggage arrives at the correct destination, but also it does so in the safest, most efficient manner.</p><p>HTTP headers are the luggage tags of the Internet. They are essential to ensuring the request from your browser arrives at the correct destination, and that traffic is returned to your browser using the correct settings also in the safest, most efficient manner.</p>
    <div>
      <h3>How are HTTP response headers used?</h3>
      <a href="#how-are-http-response-headers-used">
        
      </a>
    </div>
    <p>HTTP headers are set on both the ‘request’ and ‘response’ interactions; ‘request’ being when the client asks for the file and ‘response’ being what the server returns as a result. The functionality announced today pertains specifically to HTTP <i>response</i> headers.</p><p>HTTP response headers are used to ensure the correct data is returned to the browser along with information which helps the browser handle the data correctly. Common response headers include “Content-Type” which tells the browser the type of the content returned, e.g. “Content-Type: text/html” or “Content-Type: image/png”. Another common header is “Server:” which contains information about the software used to handle the HTTP request, e.g. “Server: cloudflare”.</p><p>Outside of basic HTTP traffic handling there are many other uses for these response headers. One such example is to improve <i>security</i>. Security mechanisms such as Content Security Policy (CSP), Cross Origin Resource Sharing (CORS) and HTTP Strict Transport Security (HSTS) are all implemented as response headers to improve and harden security for website visitors.</p><p>For example, the primary goal of CSP is to <a href="https://www.cloudflare.com/learning/security/how-to-prevent-xss-attacks/">mitigate and report Cross-Site Scripting (XSS) attacks</a>. XSS attacks occur when a malicious script is injected into a trusted website, allowing an attacker to use an application to send malicious code such as a browser-side script to a different end user. This script can then be used to compromise the end user’s interactions with the website or application, siphoning sensitive information such as passwords to a third party.</p><p>To prevent this, CSP is added by the website administrator as a HTTP response header. The CSP response header specifies the domains that the browser should consider to be valid sources of executable scripts. A <a href="https://content-security-policy.com/">CSP compatible browser</a> will then only execute scripts loaded in files received from those permitted domains, ignoring all other scripts.</p><p>CSP is added to the HTTP response by setting the ‘Content-Security-Policy’ header along with the policy which is contained in the value. For example, when using NGINX, a <a href="https://w3techs.com/technologies/overview/web_server">popular</a> web server, the administrator would have a line in the config similar to:</p>
            <pre><code>add_header Content-Security-Policy "default-src 'self';" always;</code></pre>
            <p>When using <a href="https://workers.cloudflare.com/">Cloudflare Workers</a>, the code would be similar to:</p>
            <pre><code>response.headers.set("Content-Security-Policy": "default-src 'self' example.com *.example.com",)</code></pre>
            <p>When the browser receives the HTTP response it will now detect the presence of the Content-Security-Policy header and act appropriately.</p>
    <div>
      <h2>Dynamic modification of HTTP response headers</h2>
      <a href="#dynamic-modification-of-http-response-headers">
        
      </a>
    </div>
    <p>Ensuring these headers are present on the HTTP response is often the job of the reverse proxy — a server which sits between the client and the server whose job is, amongst many others, to enrich the HTTP response data returned to the client.</p><p>“HTTP Response Header Modification” is now available for all Cloudflare plans, within Transform Rules. It provides the ability to modify HTTP response headers before they are returned to the visitor, all within Cloudflare. This is especially important when the response is coming from an origin the administrator does not have total control over, such as a SaaS provider or other third party service.</p><p>![](<a href="/content/images/2021/11/image7-8.png_REGULAR">http://staging.blog.mrk.cfdata.org/content/images/2021/11/image7-8.png_REGULAR</a> "Screenshot of "Transform Rules"")</p><p>Transform Rules allows users to modify up to ten HTTP response headers per rule using one of three options:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/28zIXSp655L8kcqJTB5beQ/dd5b8e529123ab1facc2f0c18779936f/image5-8.png" />
            
            </figure><p>‘Set dynamic’ should be used when the value of a HTTP response header needs to be populated dynamically for each HTTP response. Examples include adding the Cloudflare Bot Management ‘bot score’ to each HTTP response, or the visitor’s country:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3pCHrt1SktfeuMFoUBA9yL/2cfe53ce00d331cbda4b4a1627df3699/image3-26.png" />
            
            </figure><p><b>Note</b>: These values are calculated using the corresponding HTTP request, meaning the bot score returned in the response header will be calculated based upon the HTTP request. Similarly, the ‘ip.src.country value will be the country of the website visitor, not the origin where the response was sent from.</p><p>‘Set static’ should be used to populate the value of a header with a static, literal string. This option should be used for simple header creation such as setting the CORS or CSP policies:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7nEUjorNMt9crmydMSdRbk/75563e9f0c0844003bc1a1b15be70441/image1-46.png" />
            
            </figure><p>In both ‘set’ examples, if a header with the specified name already exists in the HTTP response, its value will be removed and replaced with the given value.</p><p>‘Remove’ is the final option, which should be used to remove all HTTP response headers with the specified name. For example, if you wanted to ensure the ‘Link’ HTTP response header was removed, you would use a rule similar to the following one:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/76oRwPpelCvA5iVFoiL0AL/aec056fa3e8a6467f139b6c2e74221fc/image6-10.png" />
            
            </figure><p>Cloudflare <a href="https://developers.cloudflare.com/firewall/cf-firewall-language/functions">functions</a> can be used within ‘set dynamic’ header modifications. These functions include:</p><ul><li><p>concat()</p></li><li><p>regex_replace()</p></li><li><p>to_string()</p></li><li><p>lower()</p></li></ul><p>An example where functions are commonly used is concat() and to_string() used to take a list of different data types and concatenate to form a single header value. For example, <b>`concat(“score=”,to_string(cf.bot_management.score))</b>` would result in a header value like `score=85`.</p><p><b>Note</b>: regular expression functions are only available for customers on Business and Enterprise plans.</p>
    <div>
      <h2>Optimizing for your website</h2>
      <a href="#optimizing-for-your-website">
        
      </a>
    </div>
    <p>One other huge benefit of moving HTTP response header modification into Cloudflare is the level of filtering provided in the rule builder. Typically, technologies like CORS and CSP are set as response headers on the entire website — or at best — on a per-directory basis.</p><p>With Transform Rules, administrators can set headers based upon a number of parameters including the visitor's country of origin, bot score, user agent, requested filename / file extension, request method and <a href="https://developers.cloudflare.com/firewall/cf-firewall-language/fields">more</a>.</p><p>This allows administrators the ability to implement setups such as having a stricter Content Security Policy for <a href="https://developers.cloudflare.com/bots/get-started/bm-subscription#verified-bots">verified</a> bots vs unverified bots/low bot score traffic.</p>
    <div>
      <h2>Try it now</h2>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>HTTP Response Header Modification can be used to improve operations, remove sensitive data, and increase security, amongst many other use cases. Try out the latest <a href="https://dash.cloudflare.com/">Transform Rule</a> yourself today.</p>
    <div>
      <h3>Watch on Cloudflare TV</h3>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div>
<p></p>
<div></div><p></p> ]]></content:encoded>
            <category><![CDATA[Full Stack Week]]></category>
            <category><![CDATA[Transform Rules]]></category>
            <guid isPermaLink="false">3ZL0uOBEsMjj6XZolsop5g</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Traffic Sequence: Which Product Runs First?]]></title>
            <link>https://blog.cloudflare.com/traffic-sequence-which-product-runs-first/</link>
            <pubDate>Wed, 20 Oct 2021 19:00:00 GMT</pubDate>
            <description><![CDATA[ Understand how Cloudflare product’s interact via the new dashboard addition ‘Traffic Sequence’. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4d3wgpLF5R3TcjPuQEejal/98c51638fd20f747cbc694e52ca313c0/Traffic-Sequence.png" />
            
            </figure><p>“Which came first, the chicken or the egg?” It’s one of life's great questions. There are hundreds of <a href="https://www.newscientist.com/question/came-first-chicken-egg">articles</a> published which conclude with eggs predating chickens by millions of years. Unfortunately, Cloudflare users don't have New Scientist on hand to answer similar questions.</p><p>Which runs first, Firewall Rules or Workers? Page Rules or Transform Rules? Whilst not as philosophically challenging, the answers to these questions are key to setting up your Cloudflare zone correctly. Answering them has become increasingly difficult as more and more functionality is added, thanks to our incredible rate of shipping products. What was once a relatively easy to understand traffic flow exploded in complexity with the introduction of products such as Workers, Load Balancing Rules and Transform Rules. And this big bang of product announcements is only accelerating each year.</p><p>To begin addressing this problem, we developed Traffic Sequence_._ Traffic Sequence is a simple dashboard illustration which shows a default, high-level overview of how Cloudflare products interact. Think of this as your atlas, rather than the “<a href="https://tfl.gov.uk/info-for/taxis-and-private-hire/licensing/learn-the-knowledge-of-london">Knowledge</a>” all drivers of London's black cabs have to learn. This helps you understand that London is in the south east of the UK, but not that it's quicker to walk than use the London Underground between Leicester Square and Covent Garden.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2FPCpXDm1Mq8mUfuZpA3Jb/7a975343d1fd48a78a6f56147972db3c/workflow.png" />
            
            </figure><p>Traffic Sequence is now enabled for all zones by default, appearing on ten product pages within the dashboard. Traffic Sequence highlights in blue the product area you are currently configuring, showing where within the HTTP request lifecycle the specific product sits. This provides context and allows users to understand which products will see the impact of changes here, and which products will not.</p><p>Traffic Sequence is designed to make Cloudflare’s edge clearer to our customers, allowing users to understand how products fit together and understand how HTTP requests flow between each.</p>
    <div>
      <h3>Dear Cloudflare, which runs first?</h3>
      <a href="#dear-cloudflare-which-runs-first">
        
      </a>
    </div>
    <p>Understanding how traffic is routed through Cloudflare has been one of the most common questions from both Cloudflare staff and customers alike.</p><blockquote><p>Is there any blog/documentation which could tell us how a request flows across different Cloudflare Products?<br /><br />e.g, I know page rules are performed first and then it goes to workers.<br /><br />But a complete flow is appreciated.</p>— Ashutosh Kumar (@ashutoshpw) <a href="https://twitter.com/ashutoshpw/status/1402866956571615234?ref_src=twsrc%5Etfw">June 10, 2021</a></blockquote> <p>But why does it matter? Let's go through a simple example.</p><p>Released in April 2021, “<a href="/introducing-transform-rules-with-url-rewriting-at-the-edge/">Transform Rules</a>” lets users rewrite URLs of HTTP requests as they proxy through their zone — for example, rewriting <code>/login.php</code> to <code>/super/secret/login-page.php</code>, all invisible to the end user.</p><p>In this scenario, the administrator also has a Firewall Rule blocking requests to the URI Path <code>/login.php</code> when the visitor is coming from a country other than the United States. What they would see, however, is that visitors from these other countries are still reaching the <code>/login.php</code> page on their servers. Why is this?</p><p>This is because URL rewrites happen <code>before</code> Firewall Rules, meaning the Firewall Rules product won’t see a URI Path of <code>/login.php</code>. Instead it will see HTTP requests with the rewritten URI path of <code>/super/secret/login-page.php</code>. Thus, when Firewall Rules evaluates the customers rule it checks:</p><ol><li><p>Is this from a country that is not the USA? Yes</p></li><li><p>AND - Is this request going to a URI Path of /login.php? No.</p></li></ol><p>As both criteria are not evaluated as ‘true’,  the rule does not match and the traffic is allowed on its journey.</p><p>This is why it is so important to know how Cloudflare's products interoperate to get the most out of your plan, and achieve your goals without having to dig through mountains of documentation.</p><p>In an alternate timeline, Traffic Sequence is used to highlight that Firewall Rules run after URL rewriting occurs, and therefore see’s the rewritten value in the URI Path. With this information the customer can then configure a Firewall Rule to look for the rewritten value in URI Path and accomplish their desired setup.</p>
    <div>
      <h3>From napkin to working prototype</h3>
      <a href="#from-napkin-to-working-prototype">
        
      </a>
    </div>
    <p>Traffic Sequence was originally borne out of a “back of the napkin” idea during the creation of Transform Rules and URL Normalization, in an attempt to show where these transformations were happening:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/XjSbnpu7X6I0NgH6smSTG/c107c541faa832014a177e384596e49a/Flow.png" />
            
            </figure><p>The idea might have started from a need of our own, but it ended up addressing well known customer and internal problems: whenever we build a new product everyone wants to understand how it fits into the big picture. So we pushed the idea further, proposing it to other teams and soliciting feedback.</p><p>This project was a great example of how bringing the right level of fidelity of thinking to the table can be evolved into an opportunity to ship to learn. Something that was initially meant as an explainer diagram for one rule type has become an almost bespoke experience of the dashboard, as it is unique to each customer's Cloudflare environment, displaying only the products available for use in that zone. We offer many options and routes to products, but we didn’t have a straightforward flow of information that customers can rely on, focusing only on what they have set up and have access to.</p><p>As part of the design process, we try to focus on asking lots of questions rather than just finding an answer. Some of the considerations we had were:</p><ul><li><p>What if we show customers a product they aren’t using?</p></li><li><p>What if we show customers a product they aren’t entitled to on their plan level?</p></li><li><p>Why aren’t we showing “this product”?</p></li><li><p>Do we have this visualisation on by default?</p></li></ul><p>After gaining internal momentum to flesh out this project, we decided to focus on three areas:</p><ol><li><p>Simplifying a complex ecosystem – what is a useful simplification?</p></li><li><p>Value that this will add beyond this first application</p></li><li><p>Opportunity to test out different navigation and mental models.</p></li></ol><p>After all, this is not just a map of our system, but a new way of navigating it entirely.</p><p>Positive early internal feedback not only aligned with our goals, but allowed us to iterate on points that needed improvement. We knew that this could be a game-changer for promoting clarity, improving discoverability and saving time with navigation: going for one click instead of three for most items.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/U6FpxdOY2xCZzXM1Ple71/21c0bf4ee67fab8da99830df106c4eda/Table.png" />
            
            </figure><p>A couple of iterations later, we were ready to put this in the hands of our users for early testing:</p><blockquote><p>Ever wondered how traffic is handled by our various products when configuring your <a href="https://twitter.com/Cloudflare?ref_src=twsrc%5Etfw">@Cloudflare</a> zone? You arent alone. We hear you. If you are interested in trying our latest experiment, get in touch. We’d LOVE your feedback. <a href="https://twitter.com/hashtag/Cloudflare?src=hash&amp;ref_src=twsrc%5Etfw">#Cloudflare</a> <a href="https://t.co/mh906T0JxV">pic.twitter.com/mh906T0JxV</a></p><p>— Sam Marsh (@marshnet_social) <a href="https://twitter.com/marshnet_social/status/1415970316178841600?ref_src=twsrc%5Etfw">July 16, 2021</a></p></blockquote><p>Thanks to our incredible community we had a high level of interest in the first week, providing insight into how this feature would be used in the real world, and answering the ultimate question of this experiment: “Does this solve the problem of understanding how Cloudflare handles HTTP requests?”  via our Traffic Sequence survey form:</p><ul><li><p>“I didn't know where my requests were going... until now.”</p></li><li><p>“It's always been confusing which products/features affect which other products/features.”</p></li><li><p>“It's really handy to be able to explain the ordering that these are happening in, and I like the deeplink into the relevant area.”</p></li></ul><p>These were all a great reminder that what triggered this work was ingrained in real customer needs.</p><p>Other feedback was rapidly incorporated into the prototype; specifically splitting Transform Rules into two separate sections to highlight that URL rewrites and header modifications occur at different parts of the request flow. We also added features which our users deemed important for clarity, such as IP Access Rules.</p>
    <div>
      <h3>Traffic Sequence for all</h3>
      <a href="#traffic-sequence-for-all">
        
      </a>
    </div>
    <p>Thanks to the great feedback and participation of all testers, both internal and external, we are now in a position where we are comfortable to take the covers off and make Traffic Sequence available to all users.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/24Ub2cZa1zHdbcx8yE5qAM/4d90523ec255b64b1ba3ae5e7f2558e3/dash1.png" />
            
            </figure><p>The visualisation can be hidden easily by clicking on the “hide” button, and the display automatically hides to preserve critical whitespace when needed:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/dntPvSgDeJPBbQSmhBgG8/f772ace4ee478e357adb3bd811a9d794/dash2.png" />
            
            </figure><p>When new products are added, or updates to products occur which modify the traffic order, this diagram will be updated accordingly.</p>
    <div>
      <h3>Evolving Traffic Sequence</h3>
      <a href="#evolving-traffic-sequence">
        
      </a>
    </div>
    <p>We know this is a high level, generic overview of how Cloudflare products interact. There is a level of nuance underneath, and a number of products and features not shown in the Traffic Sequence illustration which play an important part in keeping users safe and secure.</p><p>In the future we have aspirations to build “<i>the other side of the coin”</i>. Traffic Sequence provides a simple to understand view of how the products work by default at a high level. We also want to create a detailed, almost traceroute-like feature which allows users to see <i>exactly</i> what happens to their traffic — which products it goes via and what happens within those products, and potentially a lot more. Stay tuned!</p>
    <div>
      <h3>Try it now</h3>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>This feature is now enabled by default on all customer zones, and is visible within the dashboard locations outlined above.</p><p>Please do try it out and let us know what you think via the <a href="https://community.cloudflare.com/">Cloudflare Community</a></p> ]]></content:encoded>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[Page Rules]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">2Ycvib09odNeIRLQEkHK1m</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Modify HTTP request headers with Transform Rules]]></title>
            <link>https://blog.cloudflare.com/transform-http-request-headers/</link>
            <pubDate>Tue, 08 Jun 2021 13:12:50 GMT</pubDate>
            <description><![CDATA[ HTTP request headers can now be modified with Cloudflare Transform Rules. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>HTTP headers are central to how the web works. They are used for passing additional information between the client and server, such as which security permissions to apply and information about the client, allowing the correct content to be served.</p><p>Today we are announcing the immediate availability of the second action within Transform Rules, “<b>HTTP Request Header Modification</b>”, available for all Cloudflare plans. This new functionality provides Cloudflare administrators with the ability to easily set or remove HTTP request headers as traffic flows through Cloudflare. This allows customers to enrich requests with information such as the <a href="https://www.cloudflare.com/products/bot-management/">Cloudflare Bot Management</a> ‘<b>Bot Score</b>’ prior to being sent to their servers. Previously, HTTP request header modification was done using a <a href="https://workers.cloudflare.com/">Cloudflare Worker</a>. Today we’re introducing an easier way to do this without writing a single line of code.</p>
    <div>
      <h3>Luggage tags of the World Wide Web</h3>
      <a href="#luggage-tags-of-the-world-wide-web">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5weknAkW93x2spAcDSstwZ/75245c756aeb06e38831de9a4c6e119a/markus-spiske-pMxKbn5ucZs-unsplash.jpeg.jpeg" />
            
            </figure><p>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></p><p>Think of HTTP headers as the “luggage tag” attached to your bags when you check in at the airport.</p><p>Generally, you don't need to know what those numbers and words mean. You just know they are important in getting your suitcase from the boarding desk, to the correct airplane, and back to the correct luggage carousel at your destination.</p><p>These tags contain information about the weight of the suitcase, the destination airport code, baggage tag number, airline carrier, customs handling information, and more. These attributes are all essential, not only for ensuring that your luggage arrives at the correct destination, but also it does so in the safest, most efficient manner.</p><p>HTTP Headers are the luggage tags of the Internet. They are essential to ensuring the request from your browser arrives at the correct destination, and that traffic is returned to your browser using the correct settings also in the safest, most efficient manner.</p>
    <div>
      <h3>How are HTTP request headers used?</h3>
      <a href="#how-are-http-request-headers-used">
        
      </a>
    </div>
    <p>HTTP headers are set on both the ‘request’ and ‘response’ interactions; ‘request’ being when the client asks for the file and ‘response’ being what the server returns as a result. The functionality announced today pertains specifically to HTTP <i>request headers</i> only.</p><p>Many organizations use HTTP request headers to ensure visitor requests are served correctly. They are used to route requests to different clusters, serve mobile-friendly content, and legacy-browser friendly content.</p><p>HTTP request headers are also used for security purposes, namely authentication and authorization. Simple examples include adding a static, pre-shared key as a custom header which adds an additional security check to all inbound HTTP requests.</p><p>Ensuring these headers are present on the HTTP request is often the job of the reverse proxy — a server which sits between the client and the server whose job is, amongst many others, to enrich the HTTP request data sent to the server.</p><p>For example, when using NGINX, a <a href="https://w3techs.com/technologies/overview/web_server">popular</a> web server used as a reverse proxy, the administrator would have a line in the config similar to:</p>
            <pre><code>proxy_set_header X-Header-Name "custom";</code></pre>
            <p>When using  <a href="https://workers.cloudflare.com/">Cloudflare Workers</a>, the code would be similar to:</p>
            <pre><code>request.headers.set("X-Header-Name", "custom")</code></pre>
            <p>Each of these lines of code would add a custom HTTP request header to the next-hop destination with a name of ‘X-Header-Name’ and a value of ‘custom’.</p>
    <div>
      <h3>Dynamic modification of HTTP request headers</h3>
      <a href="#dynamic-modification-of-http-request-headers">
        
      </a>
    </div>
    <p>“HTTP Request Header Modification” is now available for all Cloudflare plans, within Transform Rules. It gives control to administrators by providing the ability to modify HTTP request headers before they're sent to their own origin servers or third-party services such as SaaS providers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7I5NghBj6EckxUgICOdPDK/9f76ebb9ad6b66d15beb7888fdbaf361/image5-1.png" />
            
            </figure><p>Transform Rules allows users to modify up to 10 HTTP request headers per rule using one of three options:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3UEQhQfcvvrHW8cu6QzBSU/93f44b01004009738966fa518219570e/image4-2.png" />
            
            </figure><p><b>‘Set dynamic’</b> should be used when the value of a HTTP request header needs to be populated dynamically for each HTTP request. Examples include adding the Cloudflare Bot Management ‘bot score’ to each HTTP request, or the visitor’s country:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2sd5APjxAng8YJig4dsnoU/ff527dc79d4caec016b2b80301e5592d/image1-3.png" />
            
            </figure><p><b>‘Set static’</b> should be used to populate the value of a header with a static, literal string. This option should be used for simple header creation such as setting the source CDN (Cloudflare) or a shared secret:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2FLBXg7HFvgYubRVr80sI3/8e80f589827a3fc4cbe23aaa2482a081/image3-3.png" />
            
            </figure><p>In both "set" examples, if a header with the specified name already exists in the HTTP request, its value will be removed and replaced with the given value.</p><p><b>‘Remove’</b> is the final option, which should be used to remove all HTTP request headers with the specified name. For example, if you wanted to ensure the ‘cf-connecting-ip’ HTTP request header was removed, you would use a rule similar to the following one:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Ju4GXquzb1Sgd5t4It714/1b9f5c9f70ecfe51706536f00e936020/image6-2.png" />
            
            </figure><p>Cloudflare <a href="https://developers.cloudflare.com/firewall/cf-firewall-language/functions">functions</a> can be used within ‘set dynamic’ header modifications. These functions include:</p><ul><li><p>concat()</p></li><li><p>regex_replace()</p></li><li><p>to_string()</p></li><li><p>lower()</p></li></ul><p>An example where functions are commonly used is concat() and to_string() used to take a list of different data types and concatenate to form a single header value. For example, <code><b>concat(“score=”,to_string(cf.bot_management.score))</b></code> would result in a header value of ‘score=85’.</p><p>Note: regular expression functions are only available for customers on Business and Enterprise plans.</p>
    <div>
      <h3>Try it now</h3>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>HTTP Request Header Modification can be used to improve operations, remove sensitive data, and increase security, amongst many other use cases. Try out the latest <a href="https://dash.cloudflare.com/">Transform Rule</a> yourself today.</p> ]]></content:encoded>
            <category><![CDATA[Transform Rules]]></category>
            <guid isPermaLink="false">7E2AMq36EW1tbi9Q2r3R59</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
        <item>
            <title><![CDATA[Dynamic URL Rewriting at the edge with Cloudflare]]></title>
            <link>https://blog.cloudflare.com/introducing-transform-rules-with-url-rewriting-at-the-edge/</link>
            <pubDate>Thu, 08 Apr 2021 09:33:00 GMT</pubDate>
            <description><![CDATA[ Today we are announcing the immediate availability of Transform Rules for all Cloudflare plans. Transform Rules provide Cloudflare administrators with the ability to create URL rewrite rules.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>URLs are ugly. They are hard to read, difficult to memorise and often auto-generated for the benefit of the origin server - not the user.</p><p>Today we are announcing the immediate availability of <b>Transform Rules</b> for <a href="https://www.cloudflare.com/plans/">all Cloudflare plans</a>. Transform Rules provide Cloudflare administrators with the ability to create URL rewrite rules. These rules transform HTTP requests as they flow through Cloudflare providing an interpretation layer between the <code>human friendly</code> and the <code>computer friendly</code>.</p>
    <div>
      <h3>Ease of understanding</h3>
      <a href="#ease-of-understanding">
        
      </a>
    </div>
    <p>Imagine you are going on a much needed around-the-world trip and want to buy a copy of John Graham-Cumming’s book <i>The Geek Atlas: 128 Places Where Science and Technology Come Alive</i> to use as inspiration. Would the link <a href="https://www.travelbooks247.com/dp/0596523203/">https://www.travelbooks247.com/dp/0596523203/</a> make sense to you? Chances are the answer is no. It's hard for humans to understand these complex, contextless URLs.</p><p>This is why companies instead provide user friendly alternatives such as: <a href="https://www.travelbooks247.com/Geek-Atlas-Places-Science-Technology/dp/0596523203/">https://www.travelbooks247.com/Geek-Atlas-Places-Science-Technology/dp/0596523203/</a> and use web servers as the interpreter. This interpretation is known as URL rewriting.</p><p>Large <a href="https://www.cloudflare.com/ecommerce/">ecommerce retailers</a> take HTTP requests to these human-friendly URLs and rewrite them using a simple pattern that strips the content <code>Geek-Atlas-Places-Science-Technology/</code> before sending the HTTP request to the backend. The human readable hyperlink is transformed into a simple format the back-end services can understand. This is an example of a <b>URL rewrite</b>.</p><p>This is common practice amongst online retailers such as large online auction platforms who follow similar practices, transforming HTTP requests to user-friendly URI Paths such as <code>/itm/The-Geek-Atlas-by-John-Graham-Cumming/333892143938</code> into <code>/itm/333892143938</code>. This is again done by stripping out the vanity-text ahead of sending the HTTP request to the origin. Literally any text can be entered in place of <code>..Geek-Atlas..</code>. in these HTTP requests. It all gets stripped.</p>
    <div>
      <h3>Maintaining control of your traffic</h3>
      <a href="#maintaining-control-of-your-traffic">
        
      </a>
    </div>
    <p>URL rewriting occurs when the request is received by the web server. This web server understands the friendly URL and knows its computer-generated counterpart. The web server retrieves the correct data and then sends it to the browser with no change to the URL in the browser’s address bar.  Common server-side implementations include the well-known <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html">mod_rewrite</a> and <a href="http://nginx.org/en/docs/http/ngx_http_rewrite_module.html">ngx_http_rewrite_module</a> modules.</p><p>Historically these web servers were located physically within a company's data center. Administrators then had full control over the URLs received, and could create the interpretation rules as and when needed.</p><p>As the world rapidly migrates on-premise applications and solutions to the cloud, administrators can find themselves in a situation where they can no longer do what they previously could. Not being responsible for the origin has a number of benefits, but it also comes with drawbacks such as lack of <code>control</code>. Previously, an administrator could quickly add a few config lines to the web server in front of their ecommerce platform. Moving to an online hosted platform makes this much more difficult to do. With the introduction of Cloudflare’s Transform Rules we are giving traffic control back to administrators, allowing them to reroute or modify HTTP requests before they're passed to servers they do not administer.</p>
    <div>
      <h3>Announcing Transform Rules</h3>
      <a href="#announcing-transform-rules">
        
      </a>
    </div>
    <p>Transform Rules allow the creation of traffic modification rules using URL rewrites, with plans to support additional rule types in the near future (such as HTTP request header modification).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2BTu2jN8BY6XUIQVKCAAwL/48c2acf88915373fb0adab88625e320b/image3-1.png" />
            
            </figure>
    <div>
      <h3>Dynamic and static rewrites</h3>
      <a href="#dynamic-and-static-rewrites">
        
      </a>
    </div>
    <p>The first available Transform Rule action is <code>rewrite</code>. It allows users to match on HTTP requests and modify the URI Path and URI Query using either <b>static</b> or <b>dynamic</b> rewrites.</p><p>A static rewrite changes a specified URI Path/Query to another. For example, users may want to transform all traffic addressed at the URI Path <code>/index.php</code> to <code>/landing.php</code>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4SWuZGRHOXH3NbHtz7xh4f/dec4543e6dc67042fd22a94bae12d9e3/image1-1.png" />
            
            </figure><p>With a dynamic rewrite you can use <a href="https://developers.cloudflare.com/firewall/cf-firewall-rules/fields-and-expressions/">expressions</a> within the filter to transform traffic based on the specified pattern. For example, you might want to modify HTTP requests addressed from <code>www.example.com/assets/*</code> to <code>www.example.com/internal/files/assets/*</code> using a single dynamic rewrite rule. In this case, you would need to modify the first component of the path using the regex_replace() function. This function allows replacing parts of the value, based on an RE-2 compatible regular expression:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5kU2ux2DmabnnaeOebjkqF/6d4d8ffa206a14f288e5ccbe01618544/image7-1.png" />
            
            </figure><p>Another function is concat(). For example, if you wanted to change all requests with a URI Path of <code>/news/2012/*</code> to <code>/archive/news/2012/*</code>, you could use the concat() function in the dynamic rewrite expression. In our example, this would become:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/Wt5iH1vxDtv86H4IpN7UQ/770c60958c7ae7be648f71d011c4758e/image5-2.png" />
            
            </figure><p>You can use rewrite rules, both static and dynamic, to modify both the URI Path and URI Query, either in conjunction or independently. For example, you could use a URI rewrite to strip the URI Query value from matching HTTP requests by setting up a static rewrite and leaving the field blank:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6EajPgJ0yuQ0Mlam4KuUaL/6282a92e8befc1a71c657c673c13f795/image4-1.png" />
            
            </figure><p>This kind of rewrite can be used for SEO purposes and to prevent cache poisoning.</p>
    <div>
      <h3>When do we rewrite requests?</h3>
      <a href="#when-do-we-rewrite-requests">
        
      </a>
    </div>
    <p>One question that arose during the development of this feature was the following: “Where should Transform Rules happen in the Cloudflare traffic flow?”.</p><p>Originally, the “rewrite” action was added to the Firewall Rules section as a <code>bolt-on</code>. This allowed us to quickly develop the functionality and iterate, given it shares the same underlying engine. Once we began testing, we learned that Transform Rules must happen practically before anything else (at the application layer or layer 7), otherwise it may get confusing.</p><p>For example, if a user were to have a simple rewrite rule to take <code>/soccer/*</code> and transform it to <code>/football/*</code>, what would happen to Page Rules, Firewall Rules, and Worker Routes, for example, that filter on <code>football</code>? The answer is they <i>wouldn't</i> trigger, since the URL they would get would have been <code>/soccer</code>. Therefore, to simplify the experience, we made the decision to execute URL rewrite rules on traffic immediately as it enters the Cloudflare edge. This way, we can guarantee the URL that is passed to subsequent Cloudflare products. Predictability is absolutely key.</p>
    <div>
      <h3>Redirect vs. rewrite</h3>
      <a href="#redirect-vs-rewrite">
        
      </a>
    </div>
    <p>There are two common methods to change where an HTTP request is sent.</p><p>Firstly, there is a <i>URL redirect</i>, also known as ‘forwarding’. This is a server-side response that tells the client to go to another URL. This means that the URL displayed in the browser’s address bar gets updated to the new URL:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6T4NLF1BLJz44gB9yLMQwP/73619231537ac12d2f6db1b9d748f0d8/image2.gif" />
            
            </figure><p>Secondly, there is a <i>URL rewrite</i>. This is a server-side modification of the URL before it is fully processed by the web server. This will not change what is seen in the user’s browser.</p><p>One of the most common uses of URL rewriting is creating human-friendly, memorable links. Rather than <a href="http://example.com/$GUID,">http://example.com/abcsd232sxa112,</a> which may be easily generated and parsed as a database ID, it's easier for humans to read a URL like <a href="http://example.com/some-descriptive-product-name.">http://example.com/some-descriptive-product-name</a>.</p>
    <div>
      <h3>Normalization</h3>
      <a href="#normalization">
        
      </a>
    </div>
    <p>We have also added new security functionality which closes a potential attack vector. This feature prevents malicious actors from potentially bypassing security rules within Cloudflare products using URL-encoding in HTTP requests. We have made this functionality available to all plans and, unless we’ve reached out to you directly via email, it was enabled by default in your zones before this blog was posted.</p><p>A number of Cloudflare products have historically used the URI of an incoming HTTP request in a literal sense when comparing it against user defined filters. For example, to block a URL like “<a href="https://example.com/%6ogin">https://example.com/%6ogin</a>”, a user would have to create a Firewall Rule explicitly matching the URI Path <code>/%ogin</code>, rather than simply entering <code>/login</code> and expecting Cloudflare to figure out all the possible URL-encoded matches.</p><p>URL Normalization is now available for all Cloudflare users, with Edge Normalization enabled by default. This enhanced protection ensures that URL encoding cannot be used to bypass security features. In addition, it also simplifies the user experience by normalizing all inbound traffic into a standard format before it reaches other Cloudflare products such as Firewall Rules, Page Rules, and Workers.</p><p>For more information please refer to the KB article <a href="https://support.cloudflare.com/hc/en-us/articles/360057896851">here</a>.</p>
    <div>
      <h3>A new home for page rules</h3>
      <a href="#a-new-home-for-page-rules">
        
      </a>
    </div>
    <p>You may have noticed that Page Rules has been renamed to “Rules” in the top-level navigation in the UI. You can now find Page Rules under ‘Rules’, alongside Transform Rules:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/cBiUpGgd2Mj6FqoGr5mz9/9d9be6bb2e36582f5152bb87f59869a1/image8-1.png" />
            
            </figure><p>This move allows us to add new rule categories such as Transform Rules. All API endpoints remain unchanged.</p>
    <div>
      <h3>Try it now</h3>
      <a href="#try-it-now">
        
      </a>
    </div>
    <p>URL Rewriting can be used to improve SEO, secure your zone further, and to improve the experience of your users and customers. Try out the new <a href="https://dash.cloudflare.com/">Transform Rules</a> yourself today.</p> ]]></content:encoded>
            <category><![CDATA[Transform Rules]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">5bucFYCFWqBvWyD4T0eocm</guid>
            <dc:creator>Sam Marsh</dc:creator>
        </item>
    </channel>
</rss>