skip to Main Content

I spent considerable time and figured out most parts but I am stuck at the last piece. I have a GAE java web application with domain from Namesilo, I enabled https by enabling managed security and now I am able to access the domain with https:// and http://.

Like all applications on net today and for SEO boost, I would like to make https default option for my domain/application.

I have tried doing 301 permanent forwarding in Namesilo to https://. However that is overriding the CNAME and A records in Namesilo and also, the forwarding to https is not working. I am not able to find much material on the net about this.

Can anyone please help or provide pointers on how to make https default for GAE java app with Namesilo domain.

2

Answers


  1. Chosen as BEST ANSWER

    Dan had pointed me in the right direction. In addition to marking ssl-enabled to true, I had to set the security-constraint in web.xml also as below from one of the other StackOverflow answers (stackoverflow.com/questions/5367974/…)

     <security-constraint>
       <web-resource-collection>
          <web-resource-name>HTTPS redirect</web-resource-name>
          <url-pattern>/*</url-pattern>
       </web-resource-collection>
       <user-data-constraint>
          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
       </user-data-constraint>
    </security-constraint>
    

  2. In the standard environment you can use the <ssl-enabled> config option in the appengine-web.xml file to require HTTPS, which causes an automatic redirection. From Syntax:

    <ssl-enabled>
    

    Optional. By default, any user can access any URL using either HTTP or
    HTTPS. You can configure an app to require HTTPS for certain URLs in
    the deployment descriptor. See Deployment Descriptor: Secure
    URLs
    .

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search