I can't redirect to an external domain in traefik version 2.1.

What did you do?

I've tried to convert my config from traefik version 1.7 to 2.1.

What did you expect to see?

A redirect from http://service1.domain.com to https://domain.com:1234 or another domain like https://domain2.net:1234.

What did you see instead?

That it doesn't work, because I just can put an ip-address instead of a name on my url in the service section of traefik version 2.1.
In traefik version 1.7 it was possible to use domain-names in the backend server url.

Thats the main reason for, becaus I can't move to traefik version 2.1. Do you have an idea how I could implement it alternatively?

Output of traefik version: (What version of Traefik are you using?)

Traefik version 2.1.4 built on 2020-02-06T17:10:06Z

What is your environment & configuration (arguments, toml, provider, platform, ...)?

Traefik 1.7 traefik.toml


        backend = "service1"
        SSLRedirect = true
        rule = "Host:service1.domain.com"

        url = "https://domain.com:1234"

Traefik 2.1 traefik.toml

    rule = "Host(`service1.domain.com`)"
    service = "service1"
    middlewares = ["https-redirect"]

    sslTemporaryRedirect = true

      url = "https://domain.com:1234"


in the v2, the dynamic configuration and the static configuration must be defined in separated files:

1 Like