Report this

What is the reason for this report?

Subdomian configuration not working

Posted on October 26, 2013

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. hostmaster.balajisivaraman.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 146.185.152.131

  • CNAME @

Here’s my NGINX sites file:

server { listen 80;

    root /usr/share/nginx/www/blog.balajisivaraman.com;
    index index.html index.htm;

    # Make site accessible from http://localhost/
    server_name balajisivaraman.com *.balajisivaraman.com;

}

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 balajisivaraman.com, here’s what I get:

balajisivaraman.com. 619 IN A 146.185.152.131

All is well and good. But when I try to resolve one of the subdomains, here’s the result.

www.balajisivaraman.com@8.8.4.4 (Default):

balajisivaraman.com. 619 IN SOA NS1.DIGITALOCEAN.com. hostmaster.balajisivaraman.com. 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?



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!

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.

Try deleting the wildcard <code>CNAME</code> and create a wildcard <code>A record</code>, instead: <br> <br><code>*.balajisivaraman.com. A 146.185.152.131</code> (do <b>not</b> 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. <br> <br>But thanks for the answer Pablo, I’ll remember that configuration as well. <br> <br>Sorry for the inconvenience.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.