Home > OS >  Custom domains / catch all hostnames on Google App Engine
Custom domains / catch all hostnames on Google App Engine

Time:04-22

I'm trying to configure my Google App Engine instance with Google Cloud custom domain configuration

  • Here is my app.yaml configuration file:
runtime: nodejs14

env_variables:
  NODE_ENV: 'production'

basic_scaling:
  max_instances: 10
  idle_timeout: 5m

On Cloudflare side:

  • I've updated the DNS records so that dashboard.mywebsite.com is perfectly working
  • I've configured the SSL on the Full mode (while I've tried with Flexible as well - both work)

Cloudflare DNS zone

I waited for a few hours and I confirm that dashboard.mywebsite.com resolves correctly and serves my content (from Google App Engine).

Next, custom domains

According to Custom Hostnames configuration in Cloudflare

Now, according to Google Cloud Load Balancer configuration details

Again, the load balancer is here responsible to map all requests received by your IP address (no matter the Host header) straight to your App Engine instance.

As a best practice, it might be useful to push a dispatch.yaml file to your instance:

dispatch:
  - url: '*/*'
    service: default

Which tells App Engine to send all requests to the default service. It works a bit like a wildcard virtual hosts on an Apache server.

  • Related