Sub.domain.com doesn't work, but domain.com/sub works fine.

If you've created a subdomain, you can access it from www.domain.com/sub, but cannot access it from sub.domain.com, there are a few things you can check.

1) Ensure the "sub" A record exists in the dns.
User Level -> DNS Control

2) Manually query your server to see if the sub-domain resolves, eg:

dig sub.domain.com @127.0.0.1

If this does not return a correct IP, then try restarting named:

killall -9 named
/etc/init.d/named start

then run the dig command again.  If that resolves it, it's most likely just dns propogation, but it might also be that the task.queue is not being processed, or it might be a bad named boot script

3) Another possibility is that your domain is controlled at an external dns location, not controlled by DA.  This means that anytime you add a subdomain, you'll need to manually log into the remote dns server to add the "A" record for that subdomain such that it resolves externally.  You can check where you domain is controlled by going to www.intodns.com.  The parent nameservers are the dns servers that control your domain. If they resolve to IPs that do not exist on your DA box, then you're using external dns servers and must manually add the A records.

4) If sub.domain.com resolves fine (if you see the shared IP page, or Apache page), then check this guide to ensure the VirtualHosts are being setup correctly, and the IP that the sub-domain resolves to, matches the IP in the VirtualHost.


Was this article helpful?

mood_bad Dislike 2
mood Like 0
visibility Views: 11326