Trying to understand Traefik (Host Header)

My goal is actually do use traefik as reverse proxy in conjunktion with webbrowser to connect to some web applications. I am using the brand new 2.0 (alpha) version.

I am following the starting guide with the example of using the whoami (docker) container.
Right now I am able to do HTTP requests like documented:

curl -H Host:whoami.docker.localhost

Now I dont know how to proceed further. I dont assume to set the Host header myself, especially when using a Browser, isnt it ?
What is the next step to do/doc to read in order to use the whoami application (as an example, or maybe you have a better one) with my browser ?

Edit: The browser may set the header, but not the header I want in order guide traefik to route to the target application.

Browsers set the "Host Header" with the real host you use in your address bar, so if you want your browser going to your container with whoami.docker.localhost, you need to have a DNS that will resolve whoami.docker.localhost with your traefik IP. (If you only want to try it on your linux computer, you can modify it in your /etc/hosts).

But you can apply other rules like Path for example (
With a rule like


You will be able to contact your whoami container if, in your browser you call "http://<YOUR_TRAEFIK_IP>/whoami"

Is it possible to write this kind of rule in a dynamic way ? I mean in the doc the default rule is mentioned :

defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`)"

is it possible to use somehting like:

defaultRule = "Host(`{{ .Name }}.{{ index .Labels \"customLabel\"}}`) && Path(`/$customLabel`)"

so that path dynamically matches the container or service name.

Am I right that the declaration of a "Rule" is only applicable at the level of concrete service/router ?