Subdomian configuration not working

October 26, 2013 1.6k views
Hi, I know I am doing something wrong. But I simply cannot figure it out. Here's my DNS zone file: $TTL 1800 @ IN SOA NS1.DIGITALOCEAN.COM. ( 1382809691 ; last update: 2013-10-26 17:48:11 UTC 3600 ; refresh 900 ; retry 1209600 ; expire 1800 ; ttl ) IN NS NS1.DIGITALOCEAN.COM. NS NS2.DIGITALOCEAN.COM. NS NS3.DIGITALOCEAN.COM. @ IN A * CNAME @ Here's my NGINX sites file: server { listen 80; root /usr/share/nginx/www/; index index.html index.htm; # Make site accessible from http://localhost/ server_name *; } Notice that I've mapped all subdomains to the same thing. That is because I cannot get individual subdomains working. When I try to resolve, here's what I get: 619 IN A All is well and good. But when I try to resolve one of the subdomains, here's the result. (Default): 619 IN SOA 1382451000 3600 900 1209600 1800 Notice that it isn't getting resolved back to the A record properly. Any ideas on what I have to change?
2 Answers
Try deleting the wildcard CNAME and create a wildcard A record, instead:

* A (do not forget the trailing dot!)
Oh! Now I am gonna look even more stupid. It seems the DNS had not propagated properly. I checked now, and they're working like a charm.

But thanks for the answer Pablo, I'll remember that configuration as well.

Sorry for the inconvenience.
Have another answer? Share your knowledge.