title: Traefik routing to both known and wildcard subdomain on a single domain
body: <p>Is it possible to have a wildcard subdomain that does not include a specific subdomain?</p>
  
  <pre><code>*.mydomain.com OK
  login.mydomain.com SKIP
  </code></pre>
  
  <p>I cannot access my login container when using a wildcard on my app container. Below is an image of what I am trying to accomplish. (the traffic logo should technically be between the list of routes and the containers)</p>
  
  <p><img src="https://i.imgur.com/VaxG59l.png" alt="Traefik Example Image"></p>
  
  <p>The following configuration does not work if the rule <code>HostRegexp:{subdomain:[a-z]+}.${HOST_DOMAIN}</code> is included. </p>
  
  <p>This configuration successfully works after removing the host regex for everything EXCEPT the wildcard subdomains.</p>
  
  <pre><code>services:
      traefik:
          image: traefik
          volumes:
          - /var/run/docker.sock:/var/run/docker.sock:ro
          - .traefik.toml:/etc/traefik/traefik.toml:ro
          ports:
          - "80:80"
          - "443:443"
  
      api:
          image: my-api-image
          labels:
          - "traefik.enable=true"
          - "traefik.port=80"
          - "traefik.frontend.rule=Host:app.${HOST_DOMAIN}; PathPrefix: /api"
  
      app:
          image: my-app-image
          labels:
          - "traefik.enable=true"
          - "traefik.port=80"
          - "traefik.frontend.rule=Host:app.${HOST_DOMAIN}"
          - "traefik.frontend.rule=HostRegexp:{subdomain:[a-z]+}.${HOST_DOMAIN}" # this second rule overwrites the first rule and I am aware of that, I am just showing what rules i've tried :)
  
      login:
          image: my-login-image
          labels:
          - "traefik.enable=true"
          - "traefik.port=80"
          - "traefik.frontend.rule=Host:login.${HOST_DOMAIN}"
  </code></pre>
  
  <p>My problem is currently with the <code>app</code> container. I am getting a bad gateway if I have the following included as a frontend rule:</p>
  
  <pre><code>"traefik.frontend.rule=HostRegexp:{subdomain:[a-z]+}.${HOST_DOMAIN}"
  </code></pre>
  
  <p>I also tried leaving the above under app, and removing the following without any luck:</p>
  
  <pre><code>"traefik.frontend.rule=Host:app.${HOST_DOMAIN}"
  </code></pre>
  
  <p>Any suggestions or ideas would be appreciated. Thanks.</p>
  
  <p>Edit: </p>
  
  <p>Rewording this a bit.</p>