Enforce profiles with Custom Rules
Last updated Aug 19, 2026 Application Profiles separate detection from mitigation. Cloudflare runs an always-on detection after a profile becomes available.
A violation does not block a request automatically. Use a Custom Rule when you are ready to mitigate traffic.
Select a detection field
Use this expression for learned Schema Profiles:
cf.schema_validation.learned.violated
Use this expression for uploaded Schema Profiles:
cf.schema_validation.uploaded.violated
Monitor the selected field in Security Analytics before creating a blocking rule.
Scope by application
Limit mitigation to the intended hostname and path:
cf.schema_validation.learned.violated and http.host eq "api.example.com" and starts_with(http.request.uri.path, "/v1/orders/")
Scope mitigation to an operation using its complete identity. Include the HTTP method, hostname, and path:
cf.schema_validation.learned.violated and http.request.method eq "POST" and http.host eq "api.example.com" and http.request.uri.path eq "/v1/orders"
Combine security signals
Combine a profile violation with Attack Score:
cf.schema_validation.learned.violated and cf.waf.score lt 20
Combine an uploaded profile violation with Bot Score:
cf.schema_validation.uploaded.violated and cf.bot_management.score lt 10
Roll out mitigation
Review production traffic and sampled violation reasons first. Then create a Custom Rule with a suitable action.
Follow these rollout practices:
- Start with monitoring in Security Analytics.
- Limit the first rule to one operation.
- Review the effect before expanding scope.
- Recheck profiles after application releases.
- Recheck violations after client changes.
For field details, refer to Application Profile fields.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/detections/application-profiles/enforce-profiles-with-custom-rules/#page","headline":"Enforce profiles with Custom Rules","description":"Mitigate profile violations with scoped Custom Rules.","url":"https://developers.cloudflare.com/waf/detections/application-profiles/enforce-profiles-with-custom-rules/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/detections/application-profiles/enforce-profiles-with-custom-rules/og.png?v=b08fd6151556692f","dateModified":"2026-08-19","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Reference Schema Profile detection fields and usage. title: Fields image: https://developers.cloudflare.com/waf/detections/application-profiles/fields/og.png?v=c2d4bb2067552e8e
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.
Docs