AI Gateway now saves up to 10 custom metadata entries per request, up from five. You can use the extra entries in log filtering, spend limits and dynamic routing conditions.
Metadata that AI Gateway adds, such as the Access user ID cf.user_id, no longer counts toward the limit and no longer replaces your last entry.
Custom metadata can be up to 12,288 bytes (12 KB) per request. If it is larger, AI Gateway removes entries from the end until the rest fit.
Bring Your Own IP (BYOIP) now supports self-service onboarding with your own autonomous system number (ASN). You can use your ASN as the origin for your prefixes instead of Cloudflare's AS13335, retaining your routing identity while using Cloudflare's services.
To get started, select your ASN when adding a prefix and verify ownership by publishing your validation token in the ASN's aut-num record. ASN verification is reused for additional prefixes in the same Cloudflare account. Self-service ASN verification supports AFRINIC, APNIC, ARIN, and RIPE. For a LACNIC-registered ASN, contact your account team.
BYOIP also validates Autonomous System Provider Authorization (ASPA) data for your ASN. Publishing an ASPA is optional. If you publish one, its provider list must include AS13335. You can keep other authorized providers.
Cloudflare Workers now supports redirect: "error" in fetch() and Request, completing support for all three redirect modes defined by the WHATWG Fetch Standard ↗︎: follow, manual, and error.
When the server responds with a redirect status (301, 302, 303, 307, or 308), fetch() with redirect: "error" rejects with a TypeError without contacting the redirect destination. It rejects even if the response has no Location header. Non-redirect 3xx responses, such as 304 Not Modified, resolve normally.
Use redirect: "error" to:
Protect credentials and secrets: Fail closed on OAuth token exchanges, signed webhooks, and API calls carrying sensitive headers (such as Cookie, X-API-Key, or Authorization) so redirects cannot forward headers to another destination.
Prevent server-side request forgery (SSRF) redirect hops: After you validate a user-supplied URL, block redirects to unvalidated hosts. This applies to webhook targets, link previews, and feed fetchers.
Enforce strict API contracts: Catch unexpected redirects (such as an upstream API redirecting to an HTML sign-in page) immediately instead of following them, consuming extra subrequests, and failing later during response parsing.
Share code across runtimes: Use the same redirect: "error" option in Workers and browsers when your code needs to reject redirects.
This mode is enabled by default for Workers with a compatibility date of 2026-12-22 or later. To opt in on an earlier compatibility date, add the fetch_redirect_error compatibility flag:
For compatibility dates on or after 2026-12-22, add no_fetch_redirect_error to opt out. If you pass a URL to fetch() or new Request(), the default is follow. If you pass an existing Request, both use its redirect mode unless you override it. Incoming requests use manual.
Custom IP and autonomous system number (ASN) lists are supported in response-side filters, including Response Header Transform Rules and rate-limit response-counting expressions. You can reuse network groups on both the request and response sides.
Support extends across customer-owned CDN rule filters, including WAF custom rules, Cache Rules, Redirect Rules, and Request Header Transform Rules.
For example, reference an ASN list named partner_networks:
ip.src.asnum in $partner_networks
For an IP list named office_network, use:
ip.src in $office_network
This expands where you can reference existing lists. It does not change plan availability, quotas, or dynamic action-value expression support. ASN lists remain Enterprise-only, and hostname lists retain their product-specific restrictions.
Header arrays preserve part association and duplicate headers. The preamble includes the line ending before the first delimiter. The empty-part count includes only parts encountered before parsing stops.
These fields require an Enterprise plan. Request body inspection and multipart parsing limits apply.
Rules expressions can inspect response cookies by name using two fields:
http.response.set_cookies: Parsed cookies from the current response headers.
raw.http.response.set_cookies: Parsed cookies from the original response headers.
For example, use this expression in a Response Header Transform Rule to match a response that sets an app cookie to preview:
http.response.set_cookies["app"][0] eq "preview"
Both fields map URL-decoded cookie names to arrays of values. Duplicate names retain multiple values. Cookie attributes such as Path and HttpOnly are excluded.
The current field reflects changes from earlier phases. The raw field preserves the original cookies. Normal within-phase field immutability still applies.
The Rules language supports HMAC signing, Signature Version 4 (SigV4) key derivation, and UTC date formatting. Use these functions in Request Header Transform Rules to authenticate reads from private Amazon S3 and Google Cloud Storage buckets.
hmac_md5(), hmac_sha1(), hmac_sha256(), and hmac_sha512() compute raw keyed digests.
sign_sigv4_hmac_sha256() derives the signing key and returns the lowercase hexadecimal signature in one call.
format_date() formats the request timestamp for date headers and credential scopes.
encode_hex() converts raw digests to lowercase hexadecimal text.
For example, set x-amz-date or x-goog-date dynamically using:
The same rule can build an Authorization header from that request timestamp. Callers do not need to supply a date header. You remain responsible for constructing the canonical request and string to sign.
The HMAC and SigV4 signing functions are available on Pro, Business, and Enterprise plans. format_date() is available on all plans without an additional entitlement. Use it in URI, request header, and response header rewrite expressions, not rule filters.
Search for Agents makes your website searchable by AI agents without manually configuring a search integration. Turn it on under Quick Actions on your domain's Overview page in the Cloudflare dashboard. Cloudflare creates an AI Search instance, starts indexing your content, and exposes a search endpoint on your domain.
Cloudflare adds discovery metadata to your HTML pages and, when Markdown for Agents is on, to Markdown responses. Agents can discover the endpoint and search with keywords or natural-language queries:
curl --get "https://example.com/.well-known/search" \ --data-urlencode "q=How do I verify webhook signatures?"
The endpoint supports both GET and HTTP QUERY requests. It returns relevant content in Markdown, not an AI-generated answer, so agents can use the results with their own models.
Search for Agents is available on all plans. Usage is subject to AI Search pricing and plan limits. You can customize configurable settings in the AI Search instance created for your domain.
Previously, OAuth sessions used by cf and MCP could not create subscriptions, so activating a product meant leaving your terminal or agent session to complete checkout in the dashboard. You can now activate subscriptions in place for common workflows:
Workers Paid: Move beyond Free plan limits such as 100,000 requests per day and 10 ms of CPU time, with 10 million requests and 30 million CPU milliseconds included each month for $5 per month plus usage.
R2: Activate an R2 subscription to start creating buckets, with 10 GB of free monthly storage plus usage-based billing beyond the free tier.
Zero Trust: Sign up for Zero Trust (with up to 50 users included on the Free plan) to put a Worker behind Cloudflare Access.
To use this from the CLI, update to cf1.0.0-rc.5 or later and reauthenticate with cf auth login so your session receives the updated OAuth scopes. Your account must also have a verified email address and an existing billing profile with a payment method on file.
In MCP clients that support the MCP 2026-07-28 specification and MCP elicitation ↗︎, Cloudflare displays the plan price and asks for your permission before activating a subscription on your account. Clients that do not support elicitation are directed to the dashboard.
You can now configure DNAT (destination NAT) translations on a Cloudflare One Appliance LAN, in beta. A DNAT translation maps a local pre-NAT prefix to a post-NAT prefix of the same size, which is the real prefix of a remote subnet reachable through Cloudflare WAN, such as a data center connected over an IPsec tunnel. Hosts on the LAN send traffic to the pre-NAT prefix, and the Appliance translates it 1:1 to the remote subnet and back.
Use DNAT translations to reach a remote network that uses the same addresses as your site, without renumbering either side. You can also use them to avoid adding routes for remote subnets to your local network. Combine DNAT translations with static NAT for a subnet when both sides of the connection use the same addresses.
In the dashboard, edit a LAN in your Appliance profile's Network configuration, then select Add DNAT translation under DNAT translations.
Prioritized traffic on Cloudflare One Appliance now takes effect when your WAN circuit is slower than the appliance port, which is common for branch Internet connections. Enter the circuit's upload speed on each WAN, and the appliance shapes upload traffic to 95% of that value. Traffic then queues on the appliance instead of in your modem or ISP network, so the appliance can send prioritized applications, such as voice and video calls, ahead of everything else.
Two traffic classes: Applications in the Prioritized traffic list go first. All other traffic is default (best effort). Prioritized traffic cannot completely starve default traffic, and flows within each class share bandwidth fairly.
Dashboard: When you create or edit a WAN, enter Provisioned upload bandwidth (Mbps) and, optionally, Provisioned download bandwidth (Mbps). Saved values appear in the WAN details.
API: Set provisioned_upload_kbps and provisioned_download_kbps, in kilobits per second, when you create or update a WAN. To remove a value with a PATCH request, set it to null.
Both fields are optional. If you do not set the upload value, the appliance does not shape the WAN, which matches how it worked before. The appliance does not currently shape download traffic. Upload shaping requires Appliance version 2026.10.3 or later, which appliances install automatically during their interrupt window.
D1 Insights now recommends indexes for your D1 databases. Each recommendation includes a CREATE INDEX statement, the queries it is expected to speed up, and usage metrics for those queries.
You can turn recommendations on or off in the dashboard, with the Cloudflare CLI, or with the API.
Review recommendations on the Metrics tab of a database in the dashboard, or list them with the Cloudflare CLI:
Workers now supports the Images URL interface directly on workers.dev subdomains through new Worker-scoped configuration. For example, a Worker can serve this transformation URL without connecting a custom domain:
Previously, transformation URLs were not available on workers.dev subdomains or during local development. A Worker could serve transformation URLs only through a connected custom domain when the URL interface was enabled for that zone.
The new Worker-scoped settings apply to deployed Workers and during local development. On connected custom domains, they override the zone-scoped settings.
The following content appears twice: first for the Cloudflare CLI (cf), then for Wrangler. Use cf for new projects. In an existing project, use the CLI that the project already uses.
Cloudflare CLI
cloudflare.config.tsts
import { defineConfig } from "cf/config";export default defineConfig({worker: { name: "image-app", // Set this to today's date compatibilityDate: "2026-11-30", images: { urlTransformations: { enabled: true, allowedOrigins: [ "images.example.com", "image-app.<YOUR_SUBDOMAIN>.workers.dev", ], }, },},});
Set enabled to true to turn on transformation URLs.
By default, Workers accepts source images only from the same zone as the transformation URL. To use external source images, specify up to 10 hostnames using allowed_origins in Wrangler or allowedOrigins in cloudflare.config.ts.
Deployed settings remain active if you remove the configuration. To disable transformation URLs on a Worker, deploy with enabled set to false. Named Wrangler environments require their own configuration, and Version URLs support transformation URLs using the Worker's deployed settings.
wrangler deploy and cf deploy apply the same settings to the Worker, while wrangler dev and cf dev use them locally.
Transformation URLs do not require an IMAGES binding. Transformed results are automatically cached in production.
Refer to Transform via URL for URL syntax and configuration methods.
Use only lowercase letters, numbers, underscores (_), and dashes (-).
Start with a letter, number, or underscore.
Be 256 characters or fewer.
Previously, namespace names could contain characters such as /, %, spaces, and uppercase letters. Some of these characters could cause API requests to read, deploy, or delete Workers in the namespace to fail.
What changes:
POST requests to the dispatch namespace API return a 400 error with code 100120 if name does not meet these requirements:
Invalid dispatch namespace name. Ensure it does not already exist and uses only lowercase letters, numbers, underscores and dashes (do not start with a dash).
wrangler dispatch-namespace create returns the same 100120 error.
Terraform applies that create a cloudflare_workers_for_platforms_dispatch_namespace resource with an invalid name fail.
Existing namespaces are not affected.
These are the same naming rules that apply to Worker names.
Cloudflare updated how range requests handle content encoding for both cached files and uncached GET requests over HTTPS.
Cached encoded files
A byte range of a cached file encoded with gzip or Brotli (br) counts bytes of the encoded file, not of the decompressed content (RFC 9110, section 14.1.2 ↗︎). Cloudflare now serves that range only if the client's Accept-Encoding header explicitly lists the encoding without q=0 (and over HTTPS for Brotli). Otherwise, Cloudflare ignores Range (RFC 9110, section 14.2 ↗︎) and sends the complete file as 200 OK using normal content negotiation. Cloudflare always sends the complete 200 OK file for a cached file encoded with Zstandard (zstd) or deflate.
Previously, a client that did not accept the encoding could receive a 206 Partial Content response whose bytes did not match its Content-Range header.
Uncached range requests
If caching is bypassed or the request is not eligible for caching, Cloudflare forwards the client's Range header to your origin. For GET requests over HTTPS, Cloudflare now also forwards the client's own Accept-Encoding header instead of Cloudflare's default gzip, br header. Previously, Cloudflare passed your origin's byte-range 206 Partial Content response to the client without decoding it, so a client could receive a range in an encoding it did not accept.
If a client sends no Accept-Encoding header (on Orange-to-Orange requests), or sends only stripped dictionary encodings (dcb or dcz), your origin can receive an empty Accept-Encoding header. Under RFC 9110, section 12.5.3 ↗︎, an empty Accept-Encoding header means the client accepts no encoding, so your origin should answer it with an unencoded response rather than 406 Not Acceptable.
Range requests that Cloudflare serves from cache, or fetches with Origin Range Requests, still send Cloudflare's own Accept-Encoding header to your origin.
You can now onboard sending domains, send for free to verified destination addresses during development and testing, and upgrade to the Workers Paid plan when going to production to send to arbitrary addresses. Use the Workers binding, the REST API, or SMTP to send alerts, reports, and notifications to your own team without a paid plan.
Sends to verified destination addresses are free on every plan. They do not count toward the monthly quota or the daily sending limits.
src/index.jsjs
export default { async fetch(request, env) { try { await env.EMAIL.send({ from: "alerts@yourdomain.com", to: "oncall@example.com", // A verified destination address subject: "Disk usage above 90%", text: "Disk usage on db-1 is above 90%.", }); } catch (error) { if ( error instanceof Error && "code" in error && error.code === "E_RECIPIENT_PLAN_RESTRICTED" ) { return new Response("Recipient is not a verified destination address", { status: 403, }); } throw error; } return new Response("Alert sent"); },};
src/index.tsts
export default { async fetch(request, env): Promise<Response> { try { await env.EMAIL.send({ from: "alerts@yourdomain.com", to: "oncall@example.com", // A verified destination address subject: "Disk usage above 90%", text: "Disk usage on db-1 is above 90%.", }); } catch (error) { if ( error instanceof Error && "code" in error && error.code === "E_RECIPIENT_PLAN_RESTRICTED" ) { return new Response("Recipient is not a verified destination address", { status: 403, }); } throw error; } return new Response("Alert sent"); },} satisfies ExportedHandler<Env>;
Messages that you send from a sending domain to verified destination addresses now count as Email Sending traffic.
Before, the capability to send to verified destination addresses was an Email Routing feature, and these messages were recorded as Email Routing traffic. This change moves this capability to Email Sending, with support for all Email Sending features:
Email Sending events, such as message.delivered and message.bounced, published to your event subscriptions.
To find these messages in the GraphQL Analytics API, filter the Email Sending datasets on the new isVerifiedRecipient field. Messages sent from a domain that has only Email Routing configured are unchanged.
If you sign in to Cloudflare with Apple, GitHub, or Google, you can now confirm your identity with a code sent to your email when you set up two-factor authentication (2FA). Previously, the dashboard asked for a Cloudflare password, which most social login users never created.
Cloudflare asks you to confirm your identity before changing security settings like 2FA. This protects your account if you leave it signed in on a shared or public computer. That check now offers email verification when you do not have a password, so you no longer need to reset a password you never set just to turn on 2FA.
To set up 2FA, go to Profile > Authentication and select Set up under Two-Factor Authentication.
Polish can now create AVIF versions of JPEG and PNG images served from your origin, alongside its existing WebP conversion. AVIF often produces smaller files than WebP, reducing transfer sizes and improving load times for image-heavy sites such as product catalogs, photo galleries, and news publications.
Polish automatically optimizes images on your zone that are served from your origin server. It strips metadata, applies compression, and can convert JPEG and PNG files to more efficient image formats.
cf zones settings edit polish --zone example.com --body '{"value":"lossy"}'cf zones settings edit avif --zone example.com --body '{"value":"on"}'cf zones settings edit webp --zone example.com --body '{"value":"on"}'
AVIF and WebP can be enabled at the same time. When both formats are enabled, Polish selects an output based on browser support, file size, and image quality:
The browser must advertise AVIF support in its Accept header.
Polish serves AVIF only if the converted image is smaller than the original.
If the browser supports both AVIF and WebP, then Polish prefers AVIF.
Browsers without AVIF support continue to receive WebP or the optimized original format.
To log prompt content for AI Security for Apps, configure payload logging and use a WAF custom rule that references a field with the cf.llm.prompt prefix.
When a custom rule matches, payload logging stores the extracted prompt. If no prompt is extracted and analysis falls back to the full request body, payload logging stores the full request body.
This workflow replaces the previous AI Security Log Mode Ruleset procedure. For more information, refer to Log prompts for matching rules.
Coding agents connected to the Cloudflare API Model Context Protocol (MCP)
server can use the submit_feedback tool. The tool requires a message,
type, and impact. It accepts optional details such as the task and the
expected and actual results. Both options return a submission ID you can share.
For a prompt that looks for blockers and workarounds across a repository, refer
to Review an existing project.
Starting today, the DNS settings endpoints no longer return or accept the deprecated foundation_dns boolean for zone settings or account defaults. The rollout is expected to take seven days. Use nameservers.type: "cloudflare.advanced" to configure Advanced Nameservers.
Update clients that still read or write foundation_dns. Remove handling for the boolean and use the nameserver type instead. The zone settings JSON for /zones/{zone_id}/dns_settings is:
PATCH requests that include foundation_dns will be rejected.
This API update does not change your Foundation DNS subscription or whether Advanced Nameservers are enabled on your zones. It does not require a zone migration.
In Images, the metadata parameter now supports Extensible Metadata Platform (XMP) metadata preservation and expands Exchangeable Image File Format (EXIF) metadata preservation to additional image formats. It can also preserve selected legacy Information Interchange Model (IPTC-IIM) metadata from JPEG sources, mapping it to XMP when converting to compatible formats.
This release does not change existing Content Credentials support, which can provide tamper-evident provenance and disclose how AI contributed to an image.
What changed
Previously, Images preserved EXIF metadata only for JPEG-to-JPEG optimizations, and did not preserve XMP or IPTC-IIM metadata. You can now keep EXIF and XMP metadata when both the source and output formats support the corresponding metadata type. For JPEG sources, you can also retain selected legacy IPTC-IIM attribution and rights metadata.
EXIF, XMP, and IPTC-IIM carry complementary information about an image. For example, publishers can retain copyright and attribution, and photographers can display capture settings alongside images on portfolio sites. E-commerce and digital asset management workflows can carry product details, captions, and internal asset information into optimized images without reattaching that information.
EXIF, XMP, and IPTC-IIM support varies by source and output format:
Format
Read from source
Write to output
JPEG
EXIF, XMP, and IPTC-IIM
EXIF, XMP, and IPTC-IIM
PNG
EXIF and XMP
EXIF and XMP
WebP
EXIF and XMP
EXIF and XMP
AVIF
EXIF and XMP
EXIF
HEIC
EXIF and XMP
Not an output format
GIF
Not supported
XMP
TIFF
Not supported
Not an output format
For example, you can convert a high-resolution JPEG to WebP while keeping both EXIF and XMP metadata.
With metadata=keep, JPEG outputs retain the original IPTC-IIM metadata. For PNG, WebP, and GIF outputs, Images maps supported IPTC-IIM fields to XMP. If the source already contains XMP, Images preserves that XMP without merging the IPTC-IIM fields.
How it works
Use metadata to control how Images handles supported metadata in re-encoded outputs. The default remains copyright, so existing requests may now preserve an EXIF copyright tag in PNG, WebP, or AVIF outputs when the source contains one.
The following URL transformation converts a JPEG source to WebP and requests metadata preservation: