13

If you have many sub-domain names like xxx.example.com, xyz.example.com etc, you can solve these through server-side scripting or other means by using a wildcard A record for *.example.com in your DNS.

How can I determine whether a wildcard domain is configured for any given domain name? Using http://network-tools.com gives a lot of information, but doesn't reveal this. If I need to use commandline tools: I use Windows. One such example that uses a wildcard domain DNS, I think, is blogspot.com.

19

You can literally query "*.example.com" and find out if there is a wildcard, but it is impossible to tell the difference between these two zones:

xyz.example.com.  IN A  1.2.3.4
*.example.com.    IN A  1.2.3.4

and

*.example.com.    IN A  1.2.3.4

i.e., you can't find out whether you're being answered by a wildcard for a given query, only that a wildcard exists.

I haven't found any Web-accessible looking glasses that support it yet, as they seem to think it's invalid input, but raw dig (or even nslookup on Windows) works like a charm:

c:\Some\User> nslookup
> *.my-test-domain.com
Server:  Wireless_Broadband_Router.home
Address:  192.168.1.1

Non-authoritative answer:
Name:    *.my-test-domain-is-not-a-real-domain.com
Address:  1.2.3.4

Or with dig:

# dig +short '*.not-a-real-domain.com'
1.2.3.4
|improve this answer|||||
  • +1: for valuable insight. Could you elaborate and also explain me how I could do such a query, or what online network/dns tools support such query (tried, but didn't find it myself)? – Abel Jul 15 '10 at 13:51
  • Using nslookup, I get a list of aliases, for instance, *.blogspot.com returns an alias with the same name. Using shore.blogspot.com returns an alias with the same name. Both receive an answer of Name: blogspot.l.google.com. When I use *.undermyhat.org, no aliases are given, but the answer is Name: *.undermyhat.org. Do I understand this correctly that blogspot uses wildcard aliases (CNAME) and undermyhat uses wildcard A records? – Abel Jul 15 '10 at 14:12
  • Using dig, you can see more of the return code. I'll put it in an answer so I get formatting, but mark this one as the answer, not mine :) – Bill Weiss Jul 15 '10 at 15:06
4

In response to BMDan's good answer:

houdini@linode:~/ > dig '*.blogspot.com' +noall +answer
*.blogspot.com.         3352    IN      CNAME   blogspot.l.google.com.
blogspot.l.google.com.  52      IN      A       72.14.204.191
houdini@linode:~/ > ^blogspot.com^undermyhat.org
dig '*.undermyhat.org' +noall +answer
*.undermyhat.org.       14400   IN      A       83.222.226.157
|improve this answer|||||
  • Thanks for answering my latest questions in a separate post. Seems like dig can indeed get quite a bit more. Hmm, CygWin? I'll google some Windows alternatives and meanwhile use my Linux vm. – Abel Jul 15 '10 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.