Only redirect * to https not on *.domain.local


I am very new to traefik and i tried to find how to redirect only my official domain to https and let traefik handle the TLS traffic.

When i use the internal domainname of the website and use the http port, i don't want redirection.

what i did now is for each app i created 3 routers. 1 http for .local, 1 http for .eu that redirects and 1 https for .eu.

Is this the best practice or can i arrange this more global so i do not have to create 3 routers for each appliation.

Kind regards,

Wouter Iliohan

You shouldn't have to create 3 routers for each application, but you should be able to create a rule which uses regex for wildcard matching only the domains you care about redirecting.