Router rule mismatch causes persistent 404s despite healthy containers
criticalTraefik returns 404 for requests to a hostname that should route to a healthy container. Router either doesn't exist in Traefik's config or its rule doesn't match the incoming request's Host/Path. Common causes: wrong domain in Host() rule, incorrect quoting/backticks, router bound to wrong entrypoint (e.g., router on 'web' but request arrives on 'websecure'), or YAML parsing corrupted the label value.
Query Traefik API at http://127.0.0.1:8080/api/http/routers to verify router exists. Compare router rule to actual request Host header. Check router entrypoints match where traffic arrives. Validate labels with 'docker inspect <container> --format {{json .Config.Labels}}' and 'docker compose config' to catch YAML parsing issues. Quote all label values in Compose files. Use backticks consistently inside Traefik rule syntax.