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, Firewall 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 URL Normalization type Normalize incoming URLs Normalize URLs to origin URL passed to Cloudflare edge URL passed to origin
www.example.com/hello (any) Off Off www.example.com/hello www.example.com/hello
www.example.com/hello (any) On Off www.example.com/hello www.example.com/hello
www.example.com/hello (any) On On www.example.com/hello www.example.com/hello
example.com/%68ello (any) Off Off example.com/%68ello example.com/%68ello
example.com/%68ello (any) On Off example.com/hello example.com/%68ello
example.com/%68ello (any) On On example.com/hello example.com/hello
example.com/%68ello//pa\th RFC-3986 Off Off example.com/%68ello//pa\th example.com/%68ello//pa\th
example.com/%68ello//pa\th RFC-3986 On Off example.com/hello//pa\th example.com/%68ello//pa\th
example.com/%68ello//pa\th RFC-3986 On On example.com/hello//pa\th example.com/hello//pa\th
example.com/%68ello//pa\th Cloudflare Off Off example.com/%68ello//pa\th example.com/%68ello//pa\th
example.com/%68ello//pa\th Cloudflare On Off example.com/hello/pa/th example.com/%68ello//pa\th
example.com/%68ello//pa\th Cloudflare On On example.com/hello/pa/th example.com/hello/pa/th