Can't browse Subdomain but DIG reports its there

Discussion in 'Server Operation' started by Nap, Feb 17, 2015.

  1. Nap

    Nap Member

    I have setup a subdomain for one of the client's sites on my server. I have entered a CNAME record (with the dot at the end) for it in ISPConfig in the client's DNS zone. (I had tried an A Record earlier but that didn't work either.)
    When I use dig subdomain.maindomain.tld from my local computer, it reports the information about the CNAME record.
    However, when I try to browse the subdomain, I get a server not found error.

    When I edit my hosts file to include an entry for subdomain.maindomain.tld with the IP address, I can see the subdomain.

    Do I need to make a DNS entry for the subdomain at the registrant's site where the maindomain is registered? (I have added a CNAME record now and waiting for the propagation to take place.) If not, why isn't it working?
    (I can supply any information needed to help diagnose the problem. I haven't posted it here because I'm not sure what I should be posting.)

    I notice that the settings in the pri. files don't use the IN key word, even though the they pass the named-checkzone check.

    Cheers,
    Nap
     
    Last edited: Feb 17, 2015
  2. Thedan04

    Thedan04 New Member

    Some DNS servers rquire you to add a dot at the end, some do not as the server may automatically add it. Compare your DNS configuration for the main domain and the subdomain. Do they both have the "." at the end in the configuration file? The fact that adding the entry to your hosts file makes this work makes it sound to me like it is a DNS looking failure that is the culprit.
     
  3. Nap

    Nap Member

    I ran named-checkconf and named-checkzone myzone.tld myzonefile . Both report no errors.
    I also looked at the files and the trailing DOT was there for all the NS, MS, and SOA Records.

    I fixed the problem by adding an A Record for the wildcard * subdomain. It works, but I would like to understand how to get it right without using the wildcard.
     
    Last edited: Feb 22, 2015
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If an * record solved the problem, then this means that the record that you tried to access was missing.
     
  5. Nap

    Nap Member

    Yes.
    I added an A Record for the domain (with a dot at the end) that points to the IP of my server and a CNAME Record for the subdomain that points to the domain (with a dot at the end). Now it's working without the *.
    (I was thinking that the Zone would handle the domain, and all I needed was to supply the subdomain.)
     
    Thedan04 likes this.

Share This Page