Load Balancing issue with Google Cloud as origin (404 routing, SNI/Host header related?)

Hi there,

I’m running into an issue while trying to geo load-balance Google Cloud Run functions and was wondering if I’m missing something.


  • 4 cloud run services deployed in various regions under different xxx.a.run.app domains
  • A single api.mydomain.com domain to load-balance traffic to these services


  • After setting up the Load Balancer and pools api.mydomain.com will show a 404 page from Google

Potential issue:

  • I assume Google doesn’t know how to route the request internally as the SNI (or Host header) from the Cloudflare request containing api.mydomain.com is unknown?
  • Unfortunately adding api.mydomain.com as a custom domain to all Google services is not possible as they must be unique (which makes sense)


  • Is there a way to rewrite the Host/SNI domain when the CF Load balancer is requesting data from a specified origin server? E.g. if Cloudflare would use the xxx.a.run.app origin domain instead of api.mydomain.com all should be good?

Thanks a lot!

This topic was automatically closed after 30 days. New replies are no longer allowed.