Wildcard DNS records

Last updated Apr 16, 2026 Normal DNS records map a domain name to one or multiple IP addresses or other associated resources to a specific domain name (a one-to-many mapping). Wildcard DNS records allow you to have a many-to-many mapping, for example if you had hundreds or thousands of subdomains you wanted to point to the same resources.

Within Cloudflare, wildcard DNS records can be either proxied or DNS-only.

Create a Wildcard record

To create a wildcard DNS record, create a DNS record with an * in the Name field.

Type Name IPv4 address Proxy status
A * 192.0.2.1 Proxied

Caution

If your project is on Cloudflare Pages, note that wildcard custom domains are not supported. Refer to known issues for details.

You can also create a wildcard DNS record specifically for a deeper subdomain. For example, if you wanted to create a wildcard record on *.www.example.com, you would create a record with *.www in the name field.

Type Name IPv4 address Proxy status
CNAME *.www example.com Proxied

Aspects to consider

Wildcards are only supported on the first label

This means that a hostname such as subdomain.*.example.com is not a wildcard on the level of the asterisk character. If you create a DNS record with that name, the asterisk is interpreted as the literal character * and not as the wildcard operator.

Wildcards are multi-level by default

If you create a DNS record on *.*.example.com, only the first asterisk is interpreted as a wildcard while the second one is interpreted as the literal * character. A record *.example.com is already multi-level by default, meaning it would cover abc.example.com as well as 123.abc.example.com, as long as there are no specific DNS records that would take precedence.

Specific DNS records take precedence over wildcard records

A wildcard record applies only when no exact record exists at the queried name. If a record or delegation exists, the wildcard does not apply.

<details>

<summary>

Example 1 - specific or below

</summary>

If you have only these two records on your domain:

Type Name Content
<code>A</code> <code>*</code> <code>192.0.2.1</code>
<code>TXT</code> <code>abc</code> <code><some_text></code>

The <code>A</code> wildcard record will be used for queries going to any subdomain of <code>example.com</code> except <code>abc.example.com</code> or anything below that specific label (<code>123.abc.example.com</code> or <code>deeper.label.abc.example.com</code>, and so on).

The wildcard will still be used for deeper labels that are not below the specific record on <code>abc.example.com</code> — for example, <code>deeper.label.xyz.example.com</code>.

</details>

<details>

<summary>

Example 2 - implicit parent

</summary>

If you have only these two records on your domain:

Type Name Content
<code>A</code> <code>*</code> <code>192.0.2.1</code>
<code>TXT</code> <code>123.abc</code> <code><some_text></code>

In this example, <code>123.abc.example.com</code> is a descendant of <code>abc.example.com</code>, and <code>abc.example.com</code> has no records associated with it. The behavior will depend on the type of nameservers you are using:

  • Standard nameservers: The wildcard <code>*.example.com</code> will still apply to <code>abc.example.com</code>.
  • <a href="https://developers.cloudflare.com/dns/foundation-dns/setup/">Advanced nameservers</a><sup><a href="#user-content-fn-1">1</a></sup>: In compliance with <a href="https://www.rfc-editor.org/rfc/rfc4592.html">RFC 4592 ↗︎</a>, the wildcard <code>*.example.com</code> will not apply to <code>abc.example.com</code>.

</details>

Availability

Customers on all plans can create and proxy wildcard DNS records.

Limitations

If you are using a CNAME setup (partial) for your DNS, Cloudflare does not automatically provision SSL/TLS certificates for your wildcard record.

For wildcard hostname certificates, certificate issuance and renewal varies based on the type of certificate you are using:

If you cannot use Delegated DCV, you need to use TXT based DCV for certificate issuance and renewal. This means you will need to place one TXT DCV token for every hostname on the certificate. If one or more of the hostnames on the certificate fails to validate, the certificate will not be issued or renewed.

This means that a wildcard certificate covering example.com and *.example.com will require two DCV tokens to be placed at the authoritative DNS provider. Similarly, a certificate with five hostnames in the SAN (including a wildcard) will require five DCV tokens to be placed at the authoritative DNS provider.

Additional information

For more information on wildcard records — as well as more details about their limitations — refer to the introductory blog post ↗︎.

Footnotes

  1. An opt-in configuration available for Enterprise customers. ↩

Was this helpful?

YesNo

On this page

Wildcard DNS records - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/dns/manage-dns-records/reference/wildcard-dns-records/#page","headline":"Wildcard DNS records","description":"How wildcard DNS records work on Cloudflare.","url":"https://developers.cloudflare.com/dns/manage-dns-records/reference/wildcard-dns-records/","inLanguage":"en","image":"https://developers.cloudflare.com/dns/manage-dns-records/reference/wildcard-dns-records/og.png?v=43a9d41b540c4487","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Troubleshoot domain verification failures caused by proxied CNAME records, CNAME flattening, or NS record conflicts. title: Verify a domain with CNAME image: https://developers.cloudflare.com/dns/manage-dns-records/troubleshooting/cname-domain-verification/og.png?v=e541802b4b187e00


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/dns/llms.txt
Use this file to discover all available pages before exploring further.