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


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DNS

sub.domain.com doesn't work, but domain.com/sub works fine.Last Modified: Nov 8, 2012, 9:00 pm
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 propagation, 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.
 
Related Helpfiles
Named is not reloading correctly when I add a domain
www.domain.com doesn't work, but domain.com works fine (or vice versa)
The task.queue is not being processed
Why do I see the "Apache is functioning normally" page instead of my domain? (sometimes: "Hey it worked!")

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST