[GH-ISSUE #2908] Support for wildcard domains [*.example.com] #6274

Open
opened 2026-08-05 01:07:34 -04:00 by saavagebueno · 4 comments
Owner

Originally created by @tiog55 on GitHub (Nov 19, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2908

Is your feature request related to a problem? Please describe.
When dealing with multi-tenancy, an usual approach is to use wildcard domains.
Unfortunately, NetBird's routing concept doesn't include this as they only support fixed domains, like example.com, which are resolvable to one or more IPv4 addresses, where in contrast, wildcard would need an example to resolve, e.g. *.example.com is not directly resolvable, but foo.example.com would be.

Describe the solution you'd like
I'd like to have the possibility of adding a wildcard domain for my network route and if any matching domain is called, the route is used to route the traffic to a peer/peer group.
For example, I'd like to configure a network route for *. example.com and all matching domains requests like foo.example.com, ..., bar.example.com are then routed over my configured routing peer/peer group.

Describe alternatives you've considered
The current workaround is to add each domain to the network route, but this is also limited to 32 domains.
An alternative workaround is to use Network Ranges, which might also include other services or even worse in case of public IP addresses, they also contain other public services, which shouldn't be routed over routing peer/peer group.

Screenshot 2024-11-19 at 12 18 39

Originally created by @tiog55 on GitHub (Nov 19, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2908 **Is your feature request related to a problem? Please describe.** When dealing with multi-tenancy, an usual approach is to use wildcard domains. Unfortunately, NetBird's routing concept doesn't include this as they only support fixed domains, like `example.com`, which are resolvable to one or more IPv4 addresses, where in contrast, wildcard would need an example to resolve, e.g. `*.example.com` is not directly resolvable, but `foo.example.com` would be. **Describe the solution you'd like** I'd like to have the possibility of adding a wildcard domain for my network route and if any matching domain is called, the route is used to route the traffic to a peer/peer group. For example, I'd like to configure a network route for `*. example.com` and all matching domains requests like `foo.example.com`, ..., `bar.example.com` are then routed over my configured routing peer/peer group. **Describe alternatives you've considered** The current workaround is to add each domain to the network route, but this is also limited to 32 domains. An alternative workaround is to use Network Ranges, which might also include other services or even worse in case of public IP addresses, they also contain other public services, which shouldn't be routed over routing peer/peer group. ![Screenshot 2024-11-19 at 12 18 39](https://github.com/user-attachments/assets/620d0bd8-c294-4582-8600-d8eed5df87f7)
saavagebueno added the feature-requestroutesdnscloud labels 2026-08-05 01:07:34 -04:00
Author
Owner

@jamie-dit commented on GitHub (Jan 15, 2025):

This is possible in the 'Networks' Feature

<!-- gh-comment-id:2593381957 --> @jamie-dit commented on GitHub (Jan 15, 2025): This is possible in the 'Networks' Feature
Author
Owner

@mlsmaycon commented on GitHub (Jan 15, 2025):

It is, please use this documentation as reference: https://docs.netbird.io/how-to/accessing-entire-domains-within-networks

<!-- gh-comment-id:2593409592 --> @mlsmaycon commented on GitHub (Jan 15, 2025): It is, please use this documentation as reference: https://docs.netbird.io/how-to/accessing-entire-domains-within-networks
Author
Owner

@jamie-dit commented on GitHub (Jan 15, 2025):

@mlsmaycon Is there a way to also create a DNS record as well? Not just the network route?

This way I don't need to setup a nameserver to redirect *.example.com (test.example.com) to a specific peer?

<!-- gh-comment-id:2594379483 --> @jamie-dit commented on GitHub (Jan 15, 2025): @mlsmaycon Is there a way to also create a DNS record as well? Not just the network route? This way I don't need to setup a nameserver to redirect *.example.com (test.example.com) to a specific peer?
Author
Owner

@rehcnt commented on GitHub (Nov 24, 2025):

Network routes is fine way to configure, bit it is giving 500 internal error if you try wildcard 1st level domains (*.com), which works pretty well in Network routes.

Image
<!-- gh-comment-id:3571106413 --> @rehcnt commented on GitHub (Nov 24, 2025): Network routes is fine way to configure, bit it is giving 500 internal error if you try wildcard 1st level domains (*.com), which works pretty well in Network routes. <img width="775" height="425" alt="Image" src="https://github.com/user-attachments/assets/5ddcb839-42a3-4f87-8627-68e9580fe20d" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#6274