Redirect non-www to www
rustam
HOBBYOP

a month ago

I want to redirect traffic from non-www to www.

The application is deployed using a Dockerfile, and I’m attempting to configure this redirect using Caddy.

However, Railway’s edge proxy performs the HTTP to HTTPS redirect before the request reaches Caddy.

How can this be resolved?

$10 Bounty

1 Replies

 Try adding both domains in Railway (so both get SSL), then handle the non-www to www redirect inside Caddy. railway's edge handles HTTPS, but it forwards the original Host header to your container.
Did you try this?


Loading...