Best way to add a DNS wildcard record for a domain

13,636

Either this, or a direct A record (saves one lookup) are the best options you have, yes.

*.example.net.  60  IN  A 1.2.3.4
Share:
13,636

Related videos on Youtube

martin
Author by

martin

Updated on September 18, 2022

Comments

  • martin
    martin almost 2 years

    What is the best way to add a DNS wildcard record for a domain?

    I want example.net, www.example.net, a.b.c.www.example.net, ... going to one server.

    Now I use:

    example.net.    60  IN  A       1.2.3.4
    *.example.net.  60  IN  CNAME   example.net.
    

    Is it possible to do it simpler?

    • user9517
      user9517 about 10 years
      What is wrong with what you're currently doing ?
    • Watki02
      Watki02 over 8 years
      What benefit would you get by being "simpler"? (e.g. less records, less lookups, easier for an end-user) I can't tell what your measure of success is, and that looks pretty good.
  • Scott Leadley
    Scott Leadley about 10 years
    Why would he want to get into the DNS service business for a domain with one server? What user or admin problem does it solve? Is is worth the effort? No down vote, but without further explanation, this seems like a solution in search of a problem.
  • Richy B.
    Richy B. about 10 years
    It's how I've wildcarded all my development domains. Use DNSmasq and anything *.mydevelopment.tld will go to my development machine. He's obviously running some sort of DNS service (either on his machine for himself, on a server for others or on a third party DNS service): I've given one solution for two out of three possibilities.
  • Nils Toedtmann
    Nils Toedtmann over 9 years
    You still need example.net. in there