Subdomains not working with nginx

February 6, 2014 8k views
I'm trying to setup subdomains in my droplet but they not seem to work. I've followed the tutorials (all of them I believe). I have two domain names pointing to the server: and works fine. works fine. redirects to page. redirects to I've setup DO DNSs and nginx config files to handle all domains and subdomains but they don't seem to work. Is it a DNS issue or a nginx issue? I don't know where else to look! Thanks.
5 Answers
I'm 100% sure you missed one important step to make it work. DNS record!!

It is exactly the same way you create your first vhost domain. The only difference is that you are going to add Cname or A record to your subdomain as indicated in the above link 3
This article walks you through setting up the DNS for your site. The tutorial includes steps to set up an A records, point your nameservers, and provides some information about MX records.
What's the actual domain name and what subdomains aren't working?
Sorry for the delay.

I realized I had a wrong CNAME record. I was entering '@' instead of ''

Now I'm not redirected, but the pages are not found.
Have you tried restarting nginx?
Have another answer? Share your knowledge.