What is the correct way to map a custom domain to Google App Engine project?
I\'ve added the custom domain, set up all the DNS records etc. and it is working! But how do
While being somewhat related to a custom domain (for example the SSL certificate used by HTTPS being tied to the domain) the HTTPS-only behaviour is not really an attribute of the custom domain mapping operation, it's just a behaviour of the app itself (regardless of being mapped to a custom domain or not).
For standard environment GAE apps part of the HTTPS-only behaviour is an automatic http
-> https
redirection performed by the GAE infra on behalf of the app if secure: always
is set in the app.yaml
configuration file.
But that configuration has, indeed, been deprecated for the flexible environment GAE apps. The PHP-specific deprecation note can be found at app.yaml changes:
- Secure handlers
The
secure
setting underhandlers
is now deprecated for the App Engine flexible environment. If you need SSL redirection, you can update your application code and use theX-Forwarded-Proto
header to redirecthttp
traffic. You can also use the HTTP Strict Transport Security response header.
You'll also note that there is no mentioning of secure
(or handlers
for that matter) in the app.yaml Configuration File doc.
So you need to take care of the http
-> https
redirection inside your app code (or the framework you use for it, if any and if it has such capability), possibly following the suggestions from the above quote. I can't really help with details on this as I'm not a PHP user.