Is it possible to use cloudflare with a subdomain of a domain that is forwarded?
We are consolidating 2 sites.
One site will be forwarded to the other site.
However, we still want to setup subdomains for vanity urls etc. as it’s used in a podcast. I know we can use the wordpress htcaccess files for the existing shortened urls we have setup in the wordpress site.
My question is can I use Cloudflare to manage the DNS etc. for the forwarded domain… and then also use cloudflare for the subdomains that we will setup? I think we would do this via page rules?
You do not appear to be talking about subdomains, but URLs.
You would need three Page Rules to achieve what you want, I’m assuming the whole test.com domain just becomes an originless redirect configuration. You would need a DNS entry for test.com, and if there is no Origin I use an AAAA record with value :: and set to .
Only one Page Rule will trigger per URL, so put your most specific Page Rules at the top, and the catchall at the bottom.
You can also do this easily in a worker, there is a template in the gallery you could copy. I’d base the decision on how many requests you will see and how many Page Rules you will need. You get some page rules and workers for free, and after that there is a relatively small cost.