Can a Cloudflare Bulk Redirect include all subdomains?

The Citead team, updated

In short. Set include_subdomains to true to match the configured source hostname and its subdomains.

Definition: Yes. Set include_subdomains to true on the URL redirect. The redirect then matches the configured source hostname, plus subdomains to its left, while path matching remains a separate setting.

Key facts

  • Cloudflare's URL redirect parameters reference defines include_subdomains as a Boolean whose default is false.
  • With include_subdomains enabled, a source at example.com also matches a.example.com and a.b.example.com.
  • The option applies to the source hostname and its subdomains. subpath_matching controls whether paths beneath the configured source path also match.
  • A source URL without a scheme matches both http and https URL schemes.
  • If several redirects match, an exact-hostname redirect takes priority over one with Include subdomains enabled.

How does Include subdomains match a hostname?

As of June 2026, Cloudflare's parameter reference documents include_subdomains as an API field with a Boolean type and a default of false. When it is true, the source URL hostname also applies to subdomains to the left of the source hostname and to the specified hostname itself.

For a source URL of http://example.com/about, Cloudflare gives http://a.example.com/about and http://a.b.example.com/about as matching requests. The setting therefore covers multiple label levels beneath the configured hostname. It does not turn a source path into a path wildcard.

{
  "source_url": "example.com/about",
  "target_url": "https://example.com/newpage",
  "include_subdomains": true
}

Does it also match paths beneath the source path?

Cloudflare documents subpath_matching as the separate control for paths below the source path. Its default is false. When enabled, a redirect from /my-folder/ can match /my-folder/item; the remaining item segment reaches the target only when preserve_path_suffix is true.

The matching algorithm compares the request scheme, hostname, and path with the redirect definition. It considers subdomains when Include subdomains is enabled and considers subpaths when Subpath matching is enabled. For example, a source path of example.com/blog can also match example.com/blog/foo and example.com/blog/bar when subpath matching is enabled. Combining the two settings covers matching hostnames beneath the configured source hostname and paths beneath the configured source path.

Which redirect wins when hostnames overlap?

Cloudflare's Bulk Redirect matching documentation says that an exact-hostname redirect wins over a redirect with Include subdomains enabled. Among redirects that both include subdomains, the redirect with the more specific domain wins. Its example compares bar.com with foo.bar.com: a request to qux.foo.bar.com uses the more specific foo.bar.com redirect.

Bulk Redirects are evaluated before the request is sent to the origin server. Once a redirect action runs, Cloudflare performs no further processing for that request. The redirect list must also be enabled by a Bulk Redirect Rule for its URL redirects to be checked.

How should the source URL be configured?

Cloudflare requires a source URL, and the incoming request URL must match it for the redirect to apply. The scheme may be omitted. When omitted, the redirect applies to both HTTP and HTTPS requests. Include the hostname and the path you intend to match, then enable include_subdomains for hostnames beneath that source.

Cloudflare's API guide shows that a Bulk Redirect workflow creates a redirect list, adds URL redirect items, and creates a Bulk Redirect Rule that enables the list. The incoming traffic for the hostname in visitors' requests must be proxied by Cloudflare.

FAQ

Does include_subdomains include the configured hostname itself?

Yes. Cloudflare describes the match as covering the specified domain as well as subdomains to its left.

Does it match a deeper URL path automatically?

No. Enable subpath_matching when the redirect should also apply to paths beneath the source path. preserve_path_suffix controls whether the unmatched path portion is copied to the target.

What happens if an exact-hostname redirect and a subdomain redirect both match?

The exact-hostname redirect wins according to Cloudflare's matching rules. For two redirects that both include subdomains, the more specific domain wins.

Sources

  1. Cloudflare, "URL redirect parameters", 26 June 2026
  2. Cloudflare, "How Bulk Redirects work", 5 May 2026
  3. Cloudflare, "Create Bulk Redirects via API", 25 August 2026

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark