Fix: Traefik 'No Route Found' 404 Error
The Cause
Traefik returns 404 with 'no route found' when it has no router matching the requested hostname. This means either the container labels are wrong, the container is not on the same Docker network as Traefik, or traefik.enable=true is missing.
The Fix
Checklist — in order
1. Check traefik.enable=true is set
labels: - "traefik.enable=true" # Required — Traefik ignores containers without this
2. Check the Host rule exactly matches your domain
# Backticks required around the domain:
- "traefik.http.routers.myapp.rule=Host(`app.example.com`)"
# NOT: Host("app.example.com") — wrong quotes, won't match
3. Check the container is on Traefik's network
services:
myapp:
networks:
- traefik-public # Must be on same network as Traefik
labels:
- "traefik.docker.network=traefik-public"
networks:
traefik-public:
external: true
Paste your config to detect proxy misconfigurations and get exact fixes.
Open Reverse Proxy Mapper →Frequently Asked Questions
Why does Traefik show the router in the dashboard but still return 404?
A router visible in the dashboard but returning 404 usually means the service has no healthy backends. The container is stopped, on the wrong network, or the port label is wrong. Check traefik.http.services.NAME.loadbalancer.server.port matches your container's actual listening port.
Does Traefik auto-detect containers without traefik.enable?
Only if you set exposedByDefault: true in Traefik's Docker provider config. The recommended default is exposedByDefault: false, which requires explicit traefik.enable=true on every container you want proxied.