Search code examples
traefik

What is the different between traefik.domain and traefik.frontend.rule=Host


traefik.frontend.rule=Host:example.com redirect requests to example.com to that backend. Then what is the usage of traefik.domain?


Solution

  • Default frontend rule is Host:{containerName}.{domain} or Host:{service}.{project_name}.{domain}

    Assuming you are using Docker as a provider, setting traefik.frontend.rule=foobar.example.com is equivalent to setting traefik.domain=exemple.com with a container called foobar

    This is documented here