Redirecting non-www to www and HTTP to HTTPS.

October 14, 2016 484 views
Nginx Node.js Let's Encrypt Ubuntu 16.04

This is the www. link using https https://www.weappm.com.br/

However, when I type weappm.com.br it does not redirect to the www., but to the HTTPS only;

http://imgur.com/a/IpATx

Does someone know what to do?

Thank you!

1 Answer

remove existing one that you set for HTTP to HTTPS and try adding the following line after
listen 80;

rewrite ^/(.*) https://www.weappm.com.br/$1 permanent;
Have another answer? Share your knowledge.