Add flexible www/non-www redirect option
What problem will this feature address?
Currently, Dokploy does not offer a built-in option to automatically redirect between www and non-www versions of a domain. Users cannot easily set up this common user experience practice without technical expertise.
Describe the solution you'd like
Add a simple option in the Dokploy dashboard that allows users to:
- Redirect www to non-www (e.g., www.domain.com to domain.com)
- Redirect non-www to www (e.g., domain.com to www.domain.com)
- Disable redirection (keep both versions accessible)
Describe alternatives you've considered
Additional context
Many hosting platforms (like Vercel and Coolify) offer similar redirection features. Adding this to Dokploy would align with industry standards and improve user experience, especially for those without technical backgrounds.
Sounds like a good idea, add presets in the redirects section, I will add this to the roadmap.
Hi, May I ask if it has been supported?
Hello, yes it sounds like a good idea, but I'm wondering what kind of implementation is viable for the entire community?
In terms of feasibility, it should be simple. I just have some questions:
- Would something like a checkbox to flag inside the domain settings modal be enough?
- What about subdomains? Should they support the feature if flagged? E.g.: For some, it may sound strange to have a domain with both
www.subdomain.example.comandsubdomain.example.com, but for simplicity and consistency, we could leave it to users to decide and eventually also opt-in to add www to subdomains.
Besides from that I think it could be a little feature to start contributing. 👍 I can start that, what do you think @Siumauricio ?
Hello, yes it sounds like a good idea, but I'm wondering what kind of implementation is viable for the entire community?
In terms of feasibility, it should be simple. I just have some questions:
- Would something like a checkbox to flag inside the domain settings modal be enough?
- What about subdomains? Should they support the feature if flagged? E.g.: For some, it may sound strange to have a domain with both
www.subdomain.example.comandsubdomain.example.com, but for simplicity and consistency, we could leave it to users to decide and eventually also opt-in to add www to subdomains.Besides from that I think it could be a little feature to start contributing. 👍 I can start that, what do you think @Siumauricio ?
That's what Coolify does! Maybe that's a clue?
Image 1:
Image 2:
Image 3:
@b3nab Good idea, I prefer to have this option inside of Redirects section, I was thinking about this, have a select with some presets and then when you select one automatically fill the fields, the coolify idea seems great for now maybe we can have 3 presets?
- Allow www & non-www.
- Redirect to www.
- Redirect to non www.
Maybe we can think about more common redirects
Yes sounds good. I created a new branch and started working on it.
Just one thing that maybe "Allow www & non-www." is not needed? Since basically is "no redirects".
@Siumauricio Did you remove this feature again?
Hello, Could you tell me when this feature is due to be rolled out? Thanks,
Not supported on compose it seems
Not supported on compose it seems
@Siumauricio Yep, we need that for compose too! Please reopen this issue!
So is this possible using compose?