Technical Anshu
Tutorials Blog
✳️ Wildcard Records

Wildcard Subdomains on Cloudflare What the Star Record Does and Where It Can Hurt

One record that answers for names you have not even thought of yet — that is the wildcard's promise, and it is real. It is also a record that quietly changes how your whole domain behaves, so it deserves an honest page of its own.

✍️ Technical Anshu🌐 Cloudflare DNS⏱️ 7 minute read
🎥 Watch the complete video guide on the Technical Anshu YouTube channel

A normal record answers for one exact name. A wildcard record — written with a star, like *.example.com — answers for every first-level subdomain that does not have its own record. Type anything.example.com, random-words.example.com, a name you invented this second: the wildcard answers for all of them, pointing them all at one place. Cloudflare's documentation confirms customers on all plans, including free, can create and proxy wildcard records. Two precision points before the risks: the star only works as the first label (you cannot wildcard the middle of a name), and any specific record always beats the wildcard — create a record for mail and the wildcard politely steps aside for that name.

How a wildcard answers (example)
blog.example.com -> its own record (specific wins) mail.example.com -> its own record (specific wins) xyz.example.com -> wildcard record typo-name.example.com -> wildcard record app.blog.example.com -> wildcard does NOT reach this deep
👆 The star catches names at one level only — and every typo becomes a real address too
1

When a Wildcard Is Genuinely Useful

  1. Multi-tenant apps — services that give every customer their own subdomain (customer1, customer2...) cannot pre-create thousands of records; a wildcard plus an app that reads the name is the standard design
  2. Catch-all pointing at one server — a home lab or a single app server where many names should land on the same machine anyway
  3. Future-proofing experiments — developers who spin test names up and down daily and do not want a DNS chore each time

If none of these sound like you, you probably do not need a wildcard — three hand-made records are clearer than one catch-all.

2

Risk One — Every Typo and Invented Name Now Exists

The wildcard cannot tell a name you wanted from a name a stranger typed. paypa1.example.com, login-secure.example.com — if someone links to them, they resolve to your server wearing your domain. On a lone website this is mostly harmless (your server shows the same site for every name), but understand what you have done: you have removed DNS as a filter. Your server and its configuration now decide everything, so the server must be set to respond sensibly to unknown names — ideally one default site, never your admin panel.

3

Risk Two — The SSL Gap Nobody Expects

  1. Cloudflare's free Universal SSL covers example.com and *.example.com — so wildcard first-level names are covered, good
  2. But the wildcard DNS record also matches deeper queries in some paths, and names like app.test.example.com are not covered by the free Universal certificate — visitors can hit certificate errors on names you never deliberately created
  3. On the origin side, your server needs a wildcard certificate of its own (for example from Let's Encrypt) or it will present the wrong certificate for most names the wildcard sends it
4

Risk Three — It Hides Your Mistakes

Without a wildcard, a forgotten record announces itself instantly: the name does not resolve, you notice, you fix it. With a wildcard, every mistake silently “works” — the traffic lands on the default server, the wrong content loads, and the real problem (a missing record, a service pointing nowhere) is masked for weeks. Teams add wildcards and then debug ghosts. If you keep one, keep a written list of the names you actually depend on, and give each a specific record — the wildcard should be a safety net, not the whole floor.

🔴 A wildcard is a public promise that every name under your domain is yours. Create it only when your server is deliberately configured for unknown names. For a normal website, blog or home setup, specific records are safer, clearer and just as free.

🎥 Watch DNS Records Being Managed in the Full Video

The video covers the DNS records screen in depth — the same screen where a wildcard record would be added.

▶️ Watch Full Video
❓ Frequently Asked Questions

Does the free Cloudflare plan allow wildcard records?

Yes. Cloudflare's own documentation says customers on all plans can create and proxy wildcard DNS records. The star must be the first label of the name, like *.example.com.

I have a wildcard. Why does one subdomain behave differently?

Because a specific record always wins over the wildcard. If mail.example.com has its own record, that record — not the wildcard — decides where mail goes. Check the DNS list for a specific record with that name.

Does the wildcard cover app.test.example.com style deep names?

The wildcard matches one level: names directly under your domain. Deeper names are not caught by *.example.com, and the free Universal SSL does not cover them either. Deep naming needs its own records and, on Cloudflare, paid certificate options.

This guide is based on the Technical Anshu Cloudflare subdomain tutorial video • Stuck on a step? Ask in the video comments — you will get a reply 🙏