Skip to main content

How Do I Use Wildcard Domains?

You may create a Domain with a wildcard name, e.g. *.example.com. A wildcard domain enables you to:

  • Create an endpoint which receives traffic for all of its subdomains, e.g. https://*.example.com. See Wildcard Endpoints to understand the rules for matching and precedence.
  • Create an endpoint on any subdomain which matches the wildcard, e.g. https://foo.example.com or https://foo.bar.baz.example.com
note

The wildcard * character may only be used as the first part of a domain, you may not create domains like app.*.example.com or *-app.example.com.

TLS provisioning

When you bring your own wildcard domain (e.g. *.app.example.com), ngrok uses a DNS01 challenge for TLS certificate provisioning which means that you must create two CNAME records when creating branded wildcard domains instead of just one.

For example, If your domain is *.app.example.com you will be required to create the following two CNAME records:

  • *.app.example.com
  • _acme-challenge.app.example.com

Certificate provisioning will not begin until you have created both DNS records.

Pricing

Wildcard domains are available on our Enterprise plan self service. They are also available on Pay-as-You-Go plans if you contact support@ngrok.com. For Pay-as-You-Go when you create a wildcard domain and run endpoints domain *.foo.com, endpoints https://a.foo.com and https://b.foo.com, we bill you for each individual endpoint, which is why we ask that you request the feature.

Reserving subdomains of a wildcard domain within the ngrok dashboard count towards the number of reserved domains in your account. For example, if you reserve foo.example.com and *.example.com, you have reserved two domains.. You will be charged for each subdomain you use. You may need to enable overages in order to do this on your paid plan.