Hostname question

Discussion in 'Linux VPS/Dedicated - cPanel' started by Nalco, Oct 27, 2007.

  1. Nalco

    Nalco New Member

    NM, I am retarded, I figured this out.

    Add an A entry for your hostname ' under ' Dns Functions ' in your Web Host Manager.

    That was the answer all along. I didnt read it clearly enough.
  2. ppc

    ppc Moderator

    Nalco, can you please state your original question/issue so in the future, users who come to this thread will see what the problem you resolved.

  3. cookie

    cookie Alien

    I bet your pardon:confused:
  4. Nalco

    Nalco New Member

    For some reason, the option to edit my above post is not available.

    I had received the following email from cpanel:

    IMPORTANT: Do not ignore this email.
    The hostname ( resolves to . It should resolve to Please be sure to correct /etc/hosts as well as the 'A' entry in zone file for the domain.

    Some or all of these problems can be caused by /etc/resolv.conf being setup incorrectly. Please check this file if you believe everything else is correct.

    You may be able to automaticly correct this problem by using the ' Add an A entry for your hostname ' under ' Dns Functions ' in your Web Host Manager

    I knew my "Hosts" and "resolv.conf files were good.

    I hadn't read the email correctly, and was wondering whether or not I had to add an "A" entry for in the DNS Zone for each domain, or to create a separate zone just for the host.

    As it turned out, there was no zone for at all, though there were zones for each domain.

    I was able to fix my problem by re-reading the email I received, particularly this part:

    You may be able to automaticly correct this problem by using the ' Add an A entry for your hostname ' under ' Dns Functions ' in your Web Host Manager

    By going to "DNS Functions/Add an entry for your hostname", the non existent hostname zone was created and thus the problem fixed.

    Sorry about deleting the original post. After I posted, I re-read it, and realized that the answer was right in my own question. :eek:
  5. ppc

    ppc Moderator

    Thanks Nalco! I have done the same thing myself where an answer might be right in front of me but I just cant see it ;) Now, if anyone else ever has a question re: that e-mail, they'll be able to learn from this thread.

    Sure, you have my pardon. ;) If you have any questions, please PM me.

  6. eJM

    eJM enterpriseJM

    And I just did - save my having to do another wasteful support ticket. Thanks. Sorry about the bump, but I did want others to know that providing full information about a resolved problem helps others too.

  7. bozboz

    bozboz New Member


    I got the same email.

    Last night it all seemed to work ok?

    I have added the domain i.e. and there is a DNS zone created for this domain but there is no DNS zone for my hostname

    Just to clarify do I need to add a new zone for the domain: and assign that to my primary IP address. When this is done do I also need to add an A entry for this?

    Maybe I have confused myself by creating an account for Is this something I needed to do at all considering I don't actaully need any services to run through this domain?

  8. Dan

    Dan Moderator

    Hi bozboz and welcome to KH :)

    In WHM under DNS Functions you will find Add an A entry for your Hostname and that should fix you right up!
  9. bozboz

    bozboz New Member

    Thanks Dan,

    I have done this - how would I check if it has worked. Can I get cPanel to run the ipcheck service? or should I just SSH in and check the etc/hosts file?
  10. Dan

    Dan Moderator

    Hello bozboz,

    If your nameservers are live with your registrar then you can do a dig against them using one of your nameserver and dig the host name.

    If not then you should now have a file in the /var/named folder. If you take a look in that file you'll find nothing more than the A record for your hostname. When you take your nameservers live this A record will be served up along with the rest of them.

    FYI the contents of the file should look something like this
    ; cPanel 10.9.0-BETA_137
    ; Zone file for
    $TTL 14400
    @      86400    IN      SOA (
                    2007030801      ; serial, todays date+todays
                    86400           ; refresh, seconds
                    7200            ; retry, seconds
                    3600000         ; expire, seconds
                    86400 )         ; minimum, seconds 86400 IN NS 86400 IN NS
     IN A x.x.x.x IN A IN MX 0
  11. bozboz

    bozboz New Member

    Thanks for the file - that helps a lot,

    I did a dig at

    with the following info:
    Query: A (IP address)

    This came back with (I have replaced the real domain with mydomain):

    ; <<>> DiG 9.3.2 <<>> A
    ; (1 server found)
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62487
    ;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

    ; IN A

    ;; ANSWER SECTION: 14400 IN A

    ;; AUTHORITY SECTION: 86400 IN NS 86400 IN NS

    ;; ADDITIONAL SECTION: 14400 IN A 14400 IN A

    ;; Query time: 132 msec
    ;; SERVER:
    ;; WHEN: Wed Oct 8 19:40:57 2008
    ;; MSG SIZE rcvd: 119

    I hope this looks correct.

    Now when I put or in a browser I get the:

    Great Success !
    Apache is working on your cPanel® and WHM™ Server

    screen. doesn't go anywere but I assume this is because I have not set up an account in WHM for

    Do I need to do this. I don't really need a website at but should I do this so that I have an email address that corresponds to my nameservers?
  12. Dan

    Dan Moderator


    Looks to me like you've got it going!

    You do not really need an email address that coincides with the domain, no but I created an account for it just in case. I do not know what would happen if/when the DNS system went to look up that domain, saw it was pointed to my server, but that the domain didn't exist on my server. So I gave it a minimal amount of disk space/bandwidth and called it good.

    And you're welcome :D

Share This Page