www not redirecting to https://

September 4, 2019 89 views
Nginx WordPress Ubuntu 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 www.mysite.com just returns a nginx 503 error page. https://mysite.com loads just fine.
www.mysite.com/contact-us as a for instance does redirect to https://mysite.com/contact-us

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

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


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”.

Have another answer? Share your knowledge.