www not redirecting to https://

Posted September 4, 2019 971 views
NginxWordPressUbuntu 18.04

I have installed wordpress and lets encrypt by using easy engine. However, one problem I am having is that the www. version of my site is not redirecting to the https:// version.
This only seems to affect the home page.
for instance just returns a nginx 503 error page. loads just fine. as a for instance does redirect to

I have created an A name record as recommended in the setup guides
which is hostname redirects to “IP address”

Any help as to what I am doing wrong would be greatly appreciated.


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers


I would recommend first starting with the 503 error. You would have to check your Nginx error log for more information:

  • Visit your home page to trigger the error and then run:
tail -100 /var/log/nginx/error.log
  • The error should point you in the right direction for further troubleshooting.

If you are not sure what the error means feel free to share it here and I can try to advise you further.

Also regarding the redirect, I guess that it is something in your config that is missing. Can you share your Nginx server block here so that I could see the exact setup that you have?


Hi Bobby,

Thanks for the reply.
I have run the error file command and had the follow reply:
tail: cannot open ’/var/log/nginx/error.log’ for reading: No such file or directory

Sorry I am not totally sure how to view the Nginx server block, could you please explain how i can do this.

Have you checked your PTR record settings. Seems like you may not have setup the www setting for your IP. There’s a “@” and a “www”.