0

My Caddy config does not redirect https://example.com to https://www.example.com

However, if I just type http://example.com, it does the redirection correctly to https://www.example.com

Caddy file:

{
    debug
    email myemail@example.com
}

example.com {
    redir https://www.example.com{uri}
}

www.example.com {
    tls {
      on_demand
    }
    reverse_proxy docker:7000
}
Oras
  • 1,036
  • 1
  • 12
  • 18

0 Answers0