Skip to main content

Support for Wildcard in --allowHosts Flag

LambdaTest Tunnel now supports wildcard entries in the --allowHosts flag. This enhancement allows users to specify patterns for hostnames instead of listing each subdomain separately, making it more flexible and efficient.

Usage of --allowHosts with Wildcards

The --allowHosts flag enables users to define which domains should be routed through the LambdaTest Tunnel while allowing other traffic to bypass it. With the new wildcard support, you can match multiple subdomains easily.

Formatting Domains with Wildcards

Follow these guidelines when using wildcards in domain names:

Use only the domain name

  • Do not include http:// or https://.
  • ✅ Example: example.com.       

Comma-separated list without spaces

  • Ensure that the list of domains is comma-separated with no spaces.
  • ✅ Example: example.com, testsite.com, anotherdomain.com

Using Wildcards to Match Subdomains

  • Prefix the domain with a dot (.) to match all its subdomains.
  • Alternatively, you can use an asterisk (*) for the same effect.
  • ✅ Example:
    • ".example.com" or "*.example.com" will match sub.example.com, api.example.com, blog.example.com, etc.
Note

Enclose the argument in quotes to prevent shell expansion of the asterisk (*).

Benefits of Wildcard Support in --allowHosts

  • Simplifies Configuration : No need to manually list each subdomain.
  • Increased Flexibility : Easily manage multiple subdomains with a single entry.
  • Better Performance : Reduces manual domain management, improving efficiency.

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles