dokploy icon indicating copy to clipboard operation
dokploy copied to clipboard

Add flexible www/non-www redirect option

Open axadrn opened this issue 1 year ago • 1 comments

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.

axadrn avatar Aug 08 '24 07:08 axadrn

Sounds like a good idea, add presets in the redirects section, I will add this to the roadmap.

Siumauricio avatar Aug 13 '24 05:08 Siumauricio

Hi, May I ask if it has been supported?

tonyljx avatar Aug 25 '24 10:08 tonyljx

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.com and subdomain.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 ?

b3nab avatar Sep 23 '24 23:09 b3nab

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.com and subdomain.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: Screenshot 2024-09-24 at 09 14 07

Image 2: Screenshot 2024-09-24 at 09 14 15

Image 3: Screenshot 2024-09-24 at 09 14 23

axadrn avatar Sep 24 '24 07:09 axadrn

@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?

  1. Allow www & non-www.
  2. Redirect to www.
  3. Redirect to non www.

Maybe we can think about more common redirects image

Siumauricio avatar Sep 25 '24 08:09 Siumauricio

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

b3nab avatar Sep 25 '24 23:09 b3nab

@Siumauricio Did you remove this feature again?

axadrn avatar Apr 20 '25 06:04 axadrn

Hello, Could you tell me when this feature is due to be rolled out? Thanks,

Eliophot avatar May 27 '25 08:05 Eliophot

Not supported on compose it seems

talaikis avatar Jun 20 '25 11:06 talaikis

Not supported on compose it seems

@Siumauricio Yep, we need that for compose too! Please reopen this issue!

axadrn avatar Jun 21 '25 02:06 axadrn

So is this possible using compose?

mmihalev avatar Oct 15 '25 07:10 mmihalev