Subdomian configuration not working


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?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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. <br> <br>But thanks for the answer Pablo, I’ll remember that configuration as well. <br> <br>Sorry for the inconvenience.

Try deleting the wildcard <code>CNAME</code> and create a wildcard <code>A record</code>, instead: <br> <br><code>* A</code> (do <b>not</b> forget the trailing dot!)