# Constant "No domain found in rule HostRegexp" warnings

**URL:** <https://community.traefik.io/t/constant-no-domain-found-in-rule-hostregexp-warnings/29438>\
**Category:** Traefik v3 (latest)\
**Tags:** letsencrypt-acme\
**Created:** [December 11, 2025, 8:13am UTC](https://community.traefik.io/t/constant-no-domain-found-in-rule-hostregexp-warnings/29438 "2025-12-11T08:13:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amogus](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@amogus](https://community.traefik.io/u/amogus)\
**Post date:** [December 11, 2025, 8:13am UTC](https://community.traefik.io/t/constant-no-domain-found-in-rule-hostregexp-warnings/29438/1 "2025-12-11T08:13:24Z")

</div>

Hi,

So I use HostRegexp rules extensively for redirecting aliases.  
Simple example from my config below:

```yaml
http:
  routers:
    home-assistant:
      rule: Host(`home-assistant.{{ domain }}`)
      entryPoints: ["lan-https"]
      service: home-assistant

    home-assistant-aliases:
      rule: HostRegexp(`(ha|haos|homeassistant)\.{{ domain | regex_escape }}`)
      entryPoints: ["lan-https"]
      middlewares:
        - home-assistant-alias-redirect
      service: noop@internal

  middlewares:
    home-assistant-alias-redirect:
      redirectRegex:
        regex: '{{ domain_regex }}'
        replacement: "https://home-assistant.{{ domain }}$1"
        permanent: true

  services:
    home-assistant:
      loadBalancer:
        servers:
          - url: "http://{{ home_assistant_address }}"

```

(ignore the jinja2 templates, my config is fed through ansible)

Everything works fine and just as I wish it does.  
BUT my logs get absolutely spammed with these warnings  
`{"level":"warn","entryPointName":"lan-https","routerName":"home-assistant-aliases@file","time":"2025-12-10T19:58:57Z","message":"No domain found in rule HostRegexp((ha|haos|homeassistant)\\.my\\.domain), the TLS options applied for this router will depend on the SNI of each request"}`

I have a lot of HostRegexp rules, so basically my logs are absolutely filled with these warnings and nothing else.

Am I doing something wrong, or will you always just be spammed with these warnings if you choose to use HostRegexp rules?

Any way to silence/filter out these warnings?

And since the warning mentions TLS, here is how my TLS is configured:

In the top level traefik config:

```yaml
certificatesResolvers:
  cloudflare:
    acme:
      email: "{{ cf_email }}"
      storage: "{{ traefik_folder }}/acme.json"
      dnsChallenge:
        provider: cloudflare
        resolvers:
          - "1.1.1.1:53"
          - "1.0.0.1:53"

```

and in a base file config:

```yaml
tls:
  options:
    default:
      minVersion: VersionTLS12
      sniStrict: true

  stores:
    default:
      defaultGeneratedCert:
        resolver: cloudflare
        domain:
          main: "{{ domain }}"
          sans:
            - "*.{{ domain }}"

```

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [December 11, 2025, 8:57am UTC](https://community.traefik.io/t/constant-no-domain-found-in-rule-hostregexp-warnings/29438/2 "2025-12-11T08:57:58Z")

</div>

You could use `Host() || Host() || Host()`.

Or create an issue (or feature request) on [Traefik Github](https://github.com/traefik/traefik).

---

<div class="post-metadata">

**Author:** ![amogus](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@amogus](https://community.traefik.io/u/amogus)\
**Post date:** [December 11, 2025, 9:35am UTC](https://community.traefik.io/t/constant-no-domain-found-in-rule-hostregexp-warnings/29438/3 "2025-12-11T09:35:31Z")

</div>

Yeah I would rather not use `Host() || Host() || Host()`, seems just so stupid when regex is much more convenient. Especially when some of my rules are much more complex than my simple example.

I must say that it’s really weird that HostRegexp is offered as a feature, but comes with unavoidable warnings. Maybe I’m using it in some way that is not intended, but honestly my usage is as simple as it gets, not sure what it’s supposed to be used for then if not usages like this.

But well, if indeed it just comes with mandatory warnings than spam the logs like there’s no tomorrow, I will indeed make a feature request on GitHub to silence this warning. (Is there any way to silence any other warnings in this program? If not, I don’t imagine this would be implemented and I would have to propose something else)

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [December 11, 2025, 11:18am UTC](https://community.traefik.io/t/constant-no-domain-found-in-rule-hostregexp-warnings/29438/4 "2025-12-11T11:18:31Z")

</div>

You can set log level to `ERROR` ([doc](https://doc.traefik.io/traefik/v3.4/observability/logs/#level)).

---

<div class="post-metadata">

**Author:** ![amogus](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@amogus](https://community.traefik.io/u/amogus)\
**Post date:** [December 11, 2025, 11:40am UTC](https://community.traefik.io/t/constant-no-domain-found-in-rule-hostregexp-warnings/29438/5 "2025-12-11T11:40:54Z")

</div>

Sure, though that is of course not a solution since I’ll miss out on all other warnings that may be relevant.

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [December 14, 2025, 7:17am UTC](https://community.traefik.io/t/constant-no-domain-found-in-rule-hostregexp-warnings/29438/6 "2025-12-14T07:17:30Z")

</div>

Traefik is open source, so you could change the log level of "No domain found…" to INFO or DEBUG and compile and run it.
