Allowing subdomains through restrictions iPad 6th gen
Your title and body seem to be asking slightly different questions.


Subdomains are distinct in restrictions. That is, a.example.com and b.example.com are distinct, and a restriction on one does not affect the other.

Furthermore, subdomain restrictions override domain restrictions, such that if example.com is blocked but a.example.com is unblocked, then a.example.com will remain unblocked but b.example.com will be blocked.
Paths (a.k.a. URL prefixes) are not distinct. That is, example.com and example.com/a are both regarded as example.com. It's not possible to use iOS restrictions to independently block or unblock just one of these.