I suggest to take a look here at the docs Entrypoint redirect 80 > 443
This worked for me and is the best solution if you want all traffic redirected from port 80 to 443.
--entrypoints.web.address=:80
--entrypoints.web.http.redirections.entryPoint.to=websecure
--entrypoints.web.http.redirections.entryPoint.scheme=https
--entrypoints.web.http.redirections.entrypoint.permanent=true
--entrypoints.websecure.address=:443
NOTE:
there are so many examples around. Just take a look at websecure.
Sometimes it is written web-secure.