Traefik path of working host return 404 reddit / selfhosted ---------------------------------------------------------------------- MonsieurLazar · 2023-12-18 06:38 I have a simple static sveltekit website configured behind traefik and cloudflare. When I go on test.example.com it works, when I click on a hyperlink for /about it takes me to test.example.com/about and it works. When I try manually going to test.example.com/about it returns a 404. For another website on just example.com I don't encounter this issue. I can directly go to example.com/about and it works. ---------------------------------------------------------------------- codeslikeaduck · 2023-12-18 22:30 If you edited your post to include your Traefik config it might be easier for people here to help spot the issue. But taking a guess, it sounds like maybe an issue with the [rules](https://doc.traefik.io/traefik/routing/routers/#rule) you have set up for the router to test website? Or maybe do you use a [redirectregex](https://doc.traefik.io/traefik/m iddlewares/http/redirectregex/) (maybe to redirect http requests or to add in a leading www.), maybe the it doesn't handle paths correctly? ---------------------------------------------------------------------- MonsieurLazar · 2023-12-19 06:10 I have updated the post with my config. I use the same labels for example.com where I don't encounter this problem. ---------------------------------------------------------------------- codeslikeaduck · 2023-12-20 00:49 Thanks for adding some config. Nothing jumps out to me as looking wrong. Maybe try replacing the $DOMAIN alias with the hardcoded domain name just as a sanity check that it is carrying through correctly? --label traefik.http.routers.$TRAEFIK_ROUTER_NAME.rule=Host(`test .example.com`) Assuming you only have that host rule and no other "path" or "pathprefix" or "redirect" middlewares, then (as far as I know) any request for the test.example.com subdomain incoming to the http or https entrypoint on traefik (regardless of path after the domain) should be redirected to the service. You likely already have but maybe take a look at the access logs for the test website to see if it the request is getting as far as it before the 404 is returned. ---------------------------------------------------------------------- MonsieurLazar · 2023-12-20 06:52 I've checked the labels and the Host in [test.example.com](https://test.example.com) I seem to be getting GET /test HTTP/2.0" 404 124 "-" "-" 9 "subdomainwebsite@docker for my test.example.com and GET /test HTTP/2.0" 302 0 "-" "-" 6 "rootwebsite@docker for my example.com website.