Https not redirecting to www (nginx)

My domain is:

Inside ~/etc/nginx/conf.d/redirect.conf I added lines to redirect non-www to www, on top of what certbot automatically added to my conf file:

server {
    return 301$request_uri;

What works: -- > -->

What does not work and I don't know why: --> it doesn't redirect to

Hello @pax_v, welcome to the Let's Encrypt community. :slightly_smiling_face:

This is not a Let's Encrypt nor Certificate issue.
However nginx has a forum and a community that maybe able to assist.


Here is a good reference on how to do that. They redirect www to apex so just switch them around for your needs.


That block might need a listen statement.
Seems like you are just begining to use nginx...
If so, you should try to learn the basics first.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.