Cloudflare Docs
Rules
Rules
Visit Rules on GitHub
Set theme to dark (⇧+D)

URL normalization settings

The Cloudflare dashboard provides the following settings to manage URL normalization:

  • Normalization type (default: RFC-3986)

    • Selects the type of normalization to perform:

      • RFC-3986 – Applies URL normalization strictly according to RFC 3986.

      • Cloudflare – In addition to what is defined in RFC 3986, applies the following URL normalization techniques:

        • Normalize back slashes (\) into forward slashes (/).
        • Merge successive forward slashes (for example, // will be normalized to /).
  • Normalize incoming URLs (default: On)

    • Configures the URLs of all incoming traffic to Cloudflare:

      • When enabled, all incoming URLs are normalized before they pass to subsequent Cloudflare features that can receive a URL as input, such as Page Rules, WAF custom rules, Workers, and Access.
      • When disabled, incoming URLs are not normalized before passing to subsequent Cloudflare features.
  • Normalize URLs to origin (default: Off)

    • Configures URLs sent to the origin:

      • When enabled, requests sent to the origin are normalized.
      • When disabled, requests sent to the origin are not modified.
    • You can only view and enable this option when Normalize incoming URLs is enabled.

​​ Configuration examples

The following table shows how URL normalization settings affect incoming URLs before they pass to other Cloudflare features and to origin:

Incoming URLNormalization typeNormalize incoming URLsNormalize URLs to originURL passed to Cloudflare edgeURL passed to origin
www.example.com/hello(any)OffOffwww.example.com/hellowww.example.com/hello
www.example.com/hello(any)OnOffwww.example.com/hellowww.example.com/hello
www.example.com/hello(any)OnOnwww.example.com/hellowww.example.com/hello
example.com/%68ello(any)OffOffexample.com/%68elloexample.com/%68ello
example.com/%68ello(any)OnOffexample.com/helloexample.com/%68ello
example.com/%68ello(any)OnOnexample.com/helloexample.com/hello
example.com/%68ello//pa\thRFC-3986OffOffexample.com/%68ello//pa\thexample.com/%68ello//pa\th
example.com/%68ello//pa\thRFC-3986OnOffexample.com/hello//pa\thexample.com/%68ello//pa\th
example.com/%68ello//pa\thRFC-3986OnOnexample.com/hello//pa\thexample.com/hello//pa\th
example.com/%68ello//pa\thCloudflareOffOffexample.com/%68ello//pa\thexample.com/%68ello//pa\th
example.com/%68ello//pa\thCloudflareOnOffexample.com/hello/pa/thexample.com/%68ello//pa\th
example.com/%68ello//pa\thCloudflareOnOnexample.com/hello/pa/thexample.com/hello/pa/th