Subdomain and settings for certain request paths

Let’s say I have DNS setup for the domain foo.com like this:

A foo.com 5.189.136.55 proxied
A www     5.189.136.55 proxied
A sub     5.189.136.55 proxied

Now I want to change some settings for certain request paths:

foo.com/a
sub.foo.com/b

Does the domain and the subdomain both share the same Page Rules?
So I’d need two Page Rules as in

foo.com/a/*
sub.foo.com/b/*

and then define setting change in those?
Is that the only way?

Page rules apply to the entire zone (domain and subdomains).

You can wildcard Page Rules to match all sub & domains: *example.com/path/*
Or you can specify a hostname: example.com/my/file.php (won’t match subdomains).

The way you specify your paths means you’ll need multiple rules because the paths are unique.
No page rule will precisely match foo.com/a/ and sub.foo.com/b/

That clears things up.
Thanks!

1 Like