title: How to enforce HTTPS traffic to Google App Engine with custom domain?
body: <p>I have a site on Google Domains (www.example.com) and it's hosted with Gcloud. I followed the instructions listed here to set up SSL and https: <a href="https://cloud.google.com/appengine/docs/standard/python/securing-custom-domains-with-ssl" rel="noreferrer">https://cloud.google.com/appengine/docs/standard/python/securing-custom-domains-with-ssl</a></p>
  
  <p>Basically, I just ran <code>gcloud beta app domain-mappings update example.com --certificate-management='AUTOMATIC'</code></p>
  
  <p>Now I can indeed access <a href="https://example.com" rel="noreferrer">https://example.com</a> and <a href="https://www.example.com" rel="noreferrer">https://www.example.com</a>. But I can access the unsecure http version of those domains as well.</p>
  
  <p>How can I set up my Google Domain to always use https? If someone types <a href="http://example.com" rel="noreferrer">http://example.com</a>, I want it to go to the https site instead.</p>
  
  <p>Records:
  My naked domain (example.com) has 4 A records and 4 AAAA records.</p>
  
  <p>My www.example.com domain has 1 CNAME record with alias=www.</p>