1

According to Google docs I added the following to app.yaml file:

handlers:
- url: /.*
  script: auto
  secure: always
  redirect_http_response_code: 301

After app's deployment when I enter http://example.com no redirection to https://example.com occurs. My custom domain is verified by Google and SSL is set to Google's auto-managed feature. What am I missing?

TextToSpeech
  • 251
  • 2
  • 9
  • Have you updated the DNS records? https://cloud.google.com/appengine/docs/standard/php7/mapping-custom-domains#dns_update – iker lasaga Jun 29 '20 at 09:02

1 Answers1

0

Handlers in app.yaml were deprecated in the Google App Engine Flexible environment.

You need to force HTTPS connection according to the guide to make the browser use https instead of http by using the HTTP Strict Transport Security response header.

Example: Strict-Transport-Security: max-age=31536000; includeSubDomains

Another option is to use the custom HTTP header X-Forwarded-Proto to redirect the HTTP traffic to HTTPS.

Below is a similar issue.

JM Gelilio
  • 3,482
  • 1
  • 11
  • 23