# ERR\_TOO\_MANY\_REDIRECTS when switching to traefik V2.4 \[resolved\]

**URL:** <https://community.traefik.io/t/err-too-many-redirects-when-switching-to-traefik-v2-4-resolved/10977>\
**Category:** Traefik v2\
**Tags:** middleware\
**Created:** [June 22, 2021, 5:49pm UTC](https://community.traefik.io/t/err-too-many-redirects-when-switching-to-traefik-v2-4-resolved/10977 "2021-06-22T17:49:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![achraf](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@achraf](https://community.traefik.io/u/achraf)\
**Post date:** [June 22, 2021, 5:49pm UTC](https://community.traefik.io/t/err-too-many-redirects-when-switching-to-traefik-v2-4-resolved/10977/1 "2021-06-22T17:49:17Z")

</div>

Hey Everyone

I'm trying to migrate from V1.7 to V2.4 and flow this steps : [https://traefik.io/blog/gradual-migration-from-traefik-1-to-2/](https://traefik.io/blog/gradual-migration-from-traefik-1-to-2/) but not work for HTTPS ( HTTP redirecting work ) .

scenario that I try to resolve is : start with empty ( no routers configured ) traefik V2.4 that redirect https request to traefik V1.7 ( https)

**my config :**

docker-compose.yml  
...  
services:

traefik:  
image: traefik:1.7.10-alpine  
command: ${TRAEFIK\_COMMAND---file}  
restart: always  
volumes:  
- /var/run/docker.sock:/var/run/docker.sock:ro  
- ${PWD}/traefik:/etc/traefik  
- ${PWD}/traefik/acme:/etc/traefik/acme  
traefik2:  
image: traefik:v2.4  
ports:  
- 80:80  
- 443:443  
- 8080:8080  
volumes:  
- /var/run/docker.sock:/var/run/docker.sock  
- ${PWD}/traefik2:/etc/traefik/  
- ${PWD}/traefik2/acme:/etc/traefik/acme  
command: \>  
--api.insecure  
......

* * *

traefik.yml

entryPoints:  
http:  
address: :80  
transport:  
respondingTimeouts:  
readTimeout: "60s"  
writeTimeout: "60s"  
https:  
address: :443  
transport:  
respondingTimeouts:  
readTimeout: "60s"  
writeTimeout: "60s"  
providers:  
providersThrottleDuration: 2s  
file:  
directory: /etc/traefik/providers

* * *

providers.yml  
http:  
routers:  
# Define a catch-all router that forwards requests to legacy Traefik V1.7  
to-traefik:  
# Catch all http domains (regex matches all strings)  
rule: "HostRegexp(`{domain:.+}`)"  
service: old-traefik-version  
# Set the lowest priority, so this route is only used as a last resort  
priority: 1  
entryPoints: http  
to-https-traefik:  
# Catch all https domains (regex matches all strings)  
rule: "HostRegexp(`{domain:.+}`)"  
service: old-https-traefik-version  
# Set the lowest priority, so this route is only used as a last resort  
priority: 1  
entryPoints: https  
tls: {}  
services:  
old-traefik-version:  
loadBalancer:  
servers:  
- url: [http://traefik](http://traefik)  
old-https-traefik-version:  
loadBalancer:  
servers:  
- url: [http://traefik](http://traefik)  
middlewares:  
middleware-retry:  
retry:  
attempts: 3

**Solution** : 💥  
add third entryPoints : tls ( traefik.yml file )  
add into the router https ( providers.yml ) : tls: {}  
service to V1.7 traefik :  
old-https-traefik-version:  
loadBalancer:  
servers:  
- url: [https://traefik](https://traefik)

---

<div class="post-metadata">

**Author:** ![cbrherms](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cbrherms/32/4435_2.png) [@cbrherms](https://community.traefik.io/u/cbrherms)\
**Post date:** [October 27, 2021, 5:10pm UTC](https://community.traefik.io/t/err-too-many-redirects-when-switching-to-traefik-v2-4-resolved/10977/2 "2021-10-27T17:10:44Z")

</div>

Any chance you can expand on this with your solution written in a working config? (with code markup / indents)
