# Wrong rule name with Docker

**URL:** <https://community.traefik.io/t/wrong-rule-name-with-docker/11308>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [July 27, 2021, 9:28pm UTC](https://community.traefik.io/t/wrong-rule-name-with-docker/11308 "2021-07-27T21:28:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Groosha](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/groosha/32/4053_2.png) [@Groosha](https://community.traefik.io/u/Groosha)\
**Post date:** [July 27, 2021, 9:28pm UTC](https://community.traefik.io/t/wrong-rule-name-with-docker/11308/1 "2021-07-27T21:28:35Z")

</div>

I have an issue similar to [Docker provider applies unexpected rule](https://community.traefik.io/t/docker-provider-applies-unexpected-rule/11162), however, I have no typos (triple-checked). Here's a part of my docker-compose:

```auto
version: '3'

services:
  seafile:
    labels:
      - traefik.http.routers.seafile.rule=Host(`seafile.example.com`)
      - traefik.http.routers.seafile.tls=true
      - traefik.http.routers.seafile.tls.certresolver=lets-encrypt
      - traefik.port=80
    depends_on:
      - db
    networks:
      - internal 
      - web

  db:
    networks:
      - internal 

networks: 
    web:
        external: true
    internal:
        external: false

```

However in the dashboard, I see the wrong name based on containers' names.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/0/0b590e37e058e76c3a1695528a9f4ec6b0fb7da0.png)

Tried Traefik v2.2 and v2.4, no luck.  
I've also tried adding `- "traefik.docker.network=web"` label, which didn't help too.

---

<div class="post-metadata">

**Author:** ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)\
**Post date:** [July 28, 2021, 6:31pm UTC](https://community.traefik.io/t/wrong-rule-name-with-docker/11308/2 "2021-07-28T18:31:16Z")

</div>

Traefik is applying the default rule to your db service.

If you don't want that you can use the docker provider option [exposedByDefault=false](https://doc.traefik.io/traefik/providers/docker/#exposedbydefault) or use [constraints](https://doc.traefik.io/traefik/providers/docker/#constraints). Personally I use `exposedByDefault=false`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [June 12, 2024, 5:36am UTC](https://community.traefik.io/t/wrong-rule-name-with-docker/11308/3 "2024-06-12T05:36:03Z")

</div>

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
