Using Resolve Override in Page Rules

The ability to override the URL or IP where a request resolves to is now available in Page Rules. This is an Enterprise feature only.

A common use case for this functionality is when you are serving an application from the URI (e.g. mydomain.com/app). In this case the 'app' may live on another server and may even be hosted by a third party. Requests to this endpoint must be directed to the server for that third party application. You can specify a CNAME host.

Important: the CNAME record must exist within the Cloudflare DNS.

To make sure you have full control of these records, it is recommended that you set the Resolve Override within the same zone name.

  1. Create the DNS record.
    • In this example I'm using s3 and the cname is domain.s3.amazonaws.com
    • In another example, I'm simply pointing to my web server IP address 
  2. The next step has several correct ways of achieving the same thing, and your setup may differ drastically. If you need additional support on on this part, contact support with your setup and what your end result should be. In my example, I have not setup a host in my s3 bucket, so I will just resolve to s3 generic host header, and I want all request from my /app sub folder to go to that s3 bucket. 

pagerule.png

Still not finding what you need?

The Cloudflare team is here to help. 95% of questions can be answered using the search tool, but if you can’t find what you need, submit a support request.

Powered by Zendesk