Search code examples
google-cloud-run

GCP Cloud Run: Disable default URL and use Custom Domain only?


Is it possible to disable the default URL like this https://my-app-332mpca-uc.a.run.app and only use my custom domain as defined in domain mapping?


Solution

  • You can't achieve that with custom domain. You can achieve something similar by adding a Load Balancer in front of Cloud Run thanks to serverless NEG.

    As you do that, you have an IP that you can add to your registrar (similar to custom domain in fact). To remove the public access of the Cloud Run default URL, you can set the ingress parameter of Cloud Run service to Internal and Cloud Load Balancer.

    And then, you have it.


    Update Septembre 2024:

    Now you can disable the default URL with Cloud Run