2

I've successfully setup my first Cloud Run environment and am wanting to use my domain to point to the cloud run site.

The provided url is verbose.run.app and I want my domain subdomain.example.com to point to this address. I have tried using a CNAME record to point to verbose.run.app but I get a 404 "The requested URL / was not found on this server.". Using a Propagation testing tool i can see it is resolving correctly to verbose.run.app so I'm not sure why I am getting the 404.

I have also attempted to use Firebase but their system completely redirects the user. I want to retain the subdomain.example.com url in the browser.

Unfortunately I am unable to use Cloud Run's domain mappings as I am using a region which does not support it.

Additionally, I was thinking i could just use an A record to point to the ip however as far as I'm aware, Cloud Run IP's are dynamic meaning that solution wouldn't work. I read somewhere to use Cloud DNS however I cannot figure it out.

Any help would be appreciated. Thanks.

1 Answers1

2

You must move your Cloud Run instance to a region that supports custom domain mapping.

The reason that your A record does not work is that Cloud Run uses a reverse proxy (load balancer) to distribute requests to the correct Cloud Run instance. That proxy must be configured with your custom domain name. If a request arrives for an unknown hostname, the proxy returns 404.

John Hanley
  • 5,164