Autodiscover for all domains having index.html on IP server with no host headers


I am thinking autodiscover… I might create a PHP index on my web server, giving it no host-header name, but leaving it only to be hosted on IP, so, for example, would display this page (actually, would generate XML on POST/GET request).

Then I would create a RULE or something on Cloudflare, so a subdomain of would redirect to
But hostheader should be of and also HTTPS communication.

Is this doable?

I wouldn’t use HTTP or access the page by IP. Both of those are just barbaric.

With the right logic, you can certainly use the exact same file to fulfill autodiscover queries for multiple domains. I have done it.

If you wanted to server it from you would need to configure vhosts accordingly. It shouldn’t prove that difficult. The path is actually checked before the subdomain, though, so you don’t have to have an if you don’t want…

Even if you are trying to figure out how to write with Workers or host it on Cloudflare, most of the discussion around how to do it is out of scope for the Cloudflare Community.

Whatever you wind up doing, please don’t use HTTP or direct IP connections. The world deserves better than that. Your clients deserve better than that. You deserve better than that.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.