How to determine which custom hostname is being requested?

If I am using Cloudflare for SaaS where I have an arbitrary number of clients using custom hostnames, how do I determine on the client what is being requested?

For instance, if the fallback URL is a wild carded “” and there are 2 customers, where one is using a custom hostname, how do I determine what is being requested?

URL requested for customer 1 (no custom hostname):
URL requested for customer 2 (with custom hostname):

What is passed on to the origin in terms of headers? Both of these requests go to, so how do I determine which customer the request is on behalf of?

Use the host header

1 Like