The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Subdomains not working

Discussion in 'General Discussion' started by xdelios, Jan 10, 2014.

  1. xdelios

    xdelios Member

    Joined:
    Jan 10, 2014
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hello,

    I've searched around the forum and found several similar problems. With a small diferrence though.

    I have a subdomain my.domain.gr not resolving.

    I saw in another thread that I could try the dig command through the ssh to check the outpout and its all showing up fine.
    My nameservers are set up correctly and all my dns settigns as well.

    Why would this happen?

    Btw I also waited a bit since I read that at some times it could just take a while to resolve.
     
  2. xdelios

    xdelios Member

    Joined:
    Jan 10, 2014
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    All I can see via the user level Cpanel through the Simple Dns zone editor that there isnt anything added for my subdomains. Now I know that If I manually add the A records to point to the subdomains it will work but why this isn't made automatically?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The "Simple DNS Zone Editor" does not show existing "A" records for subdomains. In addition, you mentioned the DNS is setup correctly so the "A" record must exist already. Try rebuilding the Apache configuration file to see if that makes a difference:

    Code:
    /scripts/rebuildhttpdconf
    Thank you.
     
  4. xdelios

    xdelios Member

    Joined:
    Jan 10, 2014
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Actually my mistake.

    In the Whm dns functions>>edit dns zone there isnt anything relate to my subdomains.

    there is only the hostname entry and the domains I have added.
    I have to mention that I have transferred the account I am trying to add a subdomain from another server could that be relate? but all the domains dns settings are set properly.

    Btw I run the command you wrote and i got

     
  5. xdelios

    xdelios Member

    Joined:
    Jan 10, 2014
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I did that and I get

    root@earth [~]# /scripts/rebuildhttpdconf
    info [rebuildhttpdconf] Missing owner for domain earth.domain.gr, force lookup to root
    Built /usr/local/apache/conf/httpd.conf OK

    Btw in whm>dns functions>edit dns zone there isnt any my.domain or any other subdomain I added.
     
  6. Phincy

    Phincy Member

    Joined:
    Feb 11, 2012
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    hi,

    With my understanding, DNS always read a domain(sub) from rightt to left. So consider your sub domain is sub.domain.com. Then basically, you should have a proper A record for the sub.domain.com. in the zone file for domain.com. So, try adding the A record for the subdomain via Whm dns functions>>edit dns zone. There, you need to select the zone for domain.com and add the A record for sub in it.

    Please note that the DNS changes are not instant. Please allow some time according to your TTL value. However, you should be able to see the changes instantly with dig +trace.

    dig +trace sub.domain.com
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, please review the DNS Zone for the parent domain name itself, as there should be an "A" record for the subdomain added within it, as indicated in the previous post.

    Thank you.
     
Loading...

Share This Page