Layer 7 Routing

Continuing the discussion from Modify/Create Page over API?:

This is a feature I would love to have. Currently I have to either do the routing on my origin, or split the traffic over multiple hostnames. –> –>

L7 routing in Cloudflare would enable me to have* –>* ->

This is nice where bits of the overall website are run on different web servers, or different hosting providers. Temporary sites running on wpengine, or bits hosted statically on S3.

In a basic example, nothing else would change. In a more complicated scenario, the backend URL would be rewritten, and the responses altered also to maintain a single namespace. Such as being served from (note the change in path), and needing to alter the body to ensure asset urls are correct. Even having ProxyPassReverse type functionality would be a start.

Technically this does exist in Cloudflare today (It’s called Resolve Override), but it is only available in the ENT plan.

The only caveats to the feature vs.the example that you gave is that the path still needs to be the same for the requested resource and if it is pointing to an external host it has to be cnamed in your DNS.* –>*

This can also be combined with another ENT feature (Host Header Override) to do some more complex mappings.

I definitely get the value of it though, can make it much more flexible and easier to maintain a site.


Thanks @cs-cf. I never knew Resolve Override existed, but that’s pretty much what I’m looking for from the documentation. Changing the path would be a bonus feature.