App Engine custom domain with service

后端 未结 2 1275
天命终不由人
天命终不由人 2020-12-31 02:56

I set up a custom domain with App Engine after following the instructions on DNS records:

https://cloud.google.com/appengine/docs/standard/java/mapping-custom-domain

2条回答
  •  有刺的猬
    2020-12-31 03:21

    Here's a step-by-step:

    1. Ensure you are a owner of the parent domain in here: https://www.google.com/webmasters/verification/home (e.g for subdomain.example.com you need to own example.com) If not, ask a friend to add you as an owner.
    2. Create a CNAME record pointing to: ghs.googlehosted.com (in Cloud DNS or wherever). Note: This will cause downtime, but it is required for App Engine to create an SSL certificate so downtime is unavoidable...
    3. Add custom domain to App Engine
      1. Go to App Engine -> Settings -> Custom Domains
      2. Click on Add a custom domain
      3. Choose the verified parent domain and click Continue
      4. Enter the subdomain (e.g subdomain.example.com) and click Save mappings
      5. Click Done (you already did this last step)
    4. Update App Engine dispatch rules
      1. Run gcloud app describe --project and take a look at the current section of dispatchRules
      2. Create dispatch.yaml or dispatch.yml file with your new rule as well as the ones already existing above (note the file format is different from the command output)
      dispatch:
        - url: /* # e.g. subdomain.example.com/*
          service: 
      
      1. Deploy it using: gcloud app deploy dispatch.yaml --project

提交回复
热议问题