[GH-ISSUE #623] How to simply redirect no-www to www #526

Closed
opened 2026-02-26 06:33:16 +03:00 by kerem · 2 comments
Owner

Originally created by @Maritima on GitHub (Oct 1, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/623

Hi

I just want the domain to be redirected to a www if it is no-www (https)
I tried this :

image

And
image

But it doesn't work.

I wanted to avoid going through Redirection Hosts
image

do you have a simpler solution?

Thank you

Originally created by @Maritima on GitHub (Oct 1, 2020). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/623 Hi I just want the domain to be redirected to a www if it is no-www (https) I tried this : ![image](https://user-images.githubusercontent.com/56633872/94811516-c0b6ac00-03f5-11eb-9336-4b42cb182d5e.png) And ![image](https://user-images.githubusercontent.com/56633872/94811562-ce6c3180-03f5-11eb-88c3-5a1c6d7c93ca.png) But it doesn't work. I wanted to avoid going through Redirection Hosts ![image](https://user-images.githubusercontent.com/56633872/94827495-cbc70780-0408-11eb-930e-d893a4720504.png) do you have a simpler solution? Thank you
kerem 2026-02-26 06:33:16 +03:00
Author
Owner

@neojp commented on GitHub (Oct 21, 2020):

I'm pretty new to NPM, but if I remember correctly the upstream nginx-proxy script would add the custom nginx configuration inside the server { server_name; } block, so you wouldn't be able to do it the way you're trying to.

<!-- gh-comment-id:713431123 --> @neojp commented on GitHub (Oct 21, 2020): I'm pretty new to NPM, but if I remember correctly the upstream `nginx-proxy` script would add the **custom nginx configuration** inside the `server { server_name; }` block, so you wouldn't be able to do it the way you're trying to.
Author
Owner

@chaptergy commented on GitHub (May 12, 2021):

Yes, the advanced config does go inside the server block. So no, this would need code outside of the server block, which is unfortunately not possible with NPM. So the redirect host would be your best bet.

<!-- gh-comment-id:840015311 --> @chaptergy commented on GitHub (May 12, 2021): Yes, the advanced config does go inside the server block. So no, this would need code outside of the server block, which is unfortunately not possible with NPM. So the redirect host would be your best bet.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#526
No description provided.