App Engine users, now you can configure custom domains from the API or CLI
As a developer, your job is to provide a professional branded experience for your users. If you’re developing web apps, that means you’ll need to host your application on its own custom domain accessed securely over HTTPS with an SSL certificate.
With App Engine, it’s always been easy to access applications from their own hostname, e.g., .appspot.com, but custom domains and SSL certificates could only be configured through the App Engine component of the Cloud Platform Console.
Today, we’re happy to announce that you can now manage both your custom domains and SSL certificates using the new beta features of the Admin API and gcloud command-line tool. These new beta features provide improved management, including the ability to automate mapping domains and uploading SSL certificates.
We hope these new API and CLI commands will simplify managing App Engine applications, help your business scale, and ultimately, allow you to spend more time writing code.
Managing App Engine custom domains from the CLI
To get started with the CLI, first install the Google Cloud SDK.
To use the new beta commands, make sure you’ve installed the beta component:
And if you’ve already installed that component, make sure that it's up to date:
Now that you’ve installed the new beta command, verify your domain to register ownership:
After you've verified ownership, map that domain to your App Engine application:
You can also map your subdomains this way. Note that as of today, only the verified owner can create mappings to a domain.
With the response from the last command, complete the mapping to your application by updating the DNS records of your domain.
To create an HTTPS connection, upload your SSL certificate:
Then update your domain mapping to include the certificate that you just uploaded:
We're also excited to provide a single command that you can use to renew your certificate before it expires:
As with all beta releases, these commands should not yet be used in production environments. For complete details, please check out the full set of instructions, along with the API reference. If you have any questions or feedback, we’ll be watching the Google App Engine forum, you can log a public issue, or get in touch on the App Engine slack channel (#app-engine).