#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    16
    Rep Power
    0

    host name vs. alias : What is the difference?


    Hello,

    I have been unsuccessfully wrestling with the difference between the hostname of a machine and an alias for the domain name associated with that machine that appears as an A record in the DNS. Could someone please enlighten me?

    For example, must a hostname for a machine also appear as an alias (CNAME) in the DNS? What is the best practices here?

    Thanks,
    Douglass Turner
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    Your system hostname should be in the format host.domain.com, not domain.com.

    When you run the command hostname you should get the FQDN as host.domain.com. The command hostname -s gives you just the host part.

    Your mail server name, website name, dns server name and the like, should always be FQDN. That said, using http://domain.com/ is non-standard. Some folks use domain.com as their MX, they are completely clueless. That'd interpret as domain being the host and com being the domain name, apparently they can't be the MX for the roots.

    must a hostname for a machine also appear as an alias (CNAME) in the DNS?
    CNAME is being used by DNS illiterate admins who are completely clueless and lazy.
    Say you run a mail server and apache on the same box, this box should have its system hostname set to mail.domain.com. This mail.domain.com should also have an A record in its domain.com's zone.
    If this box runs www and DNS, you need to give DNS higher priority in its hostname and preferably set its hostname as ns1.domain.com.
    Why so? Because ns1.domain.com is glued at roots even the dns is being down, ns1.domain.com is resolvable to an IP, which enhance reliability.
    That said, your theimageengine.com as the MX is non-standard and decreases reliability.
    Last edited by freebsd; December 30th, 2003 at 08:57 AM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    16
    Rep Power
    0
    freebsd,

    Umm. You didn't really answer my question. My goal is to be able to have {www, mail}.my-domain.com both point to the same IP address (the one I established via pairnic.com's nifty custom DNS server for my-domain.com).

    I am not running a DNS on my machine. I am simply running a box in my home office connected via DSL to an ISP (not pairnic.com).

    That said, I am still left with the issue of what hostname to use for my physical box: my-hostname.my-domain.com.

    Are you saying I should not use CNAMEs for www and mail?

    Should (must?) my-hostname appear as a CNAME.

    Perhaps you could simple sketch the preferred setup since it sounds straightforward, I just don't happen to know it. Hostname's I get. Throwing DNS issues into the mix just hurts my brain.

    -Douglass
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    You didn't really answer my question
    I already replied what you asked, unless you didn't ask correctly.
    That said, I am still left with the issue of what hostname to use for my physical box: my-hostname.my-domain.com.
    Look, I already replied with
    Code:
    Say you run a mail server and apache on the same box, this box should have its system hostname set to mail.domain.com. 
    This mail.domain.com should also have an A record in its domain.com's zone
    Are you saying I should not use CNAMEs for www and mail?

    Should (must?) my-hostname appear as a CNAME.
    There is no such thing as CNAME on earth any longer.
    Perhaps you could simple sketch the preferred setup since it sounds straightforward
    You didn't mention this in your first post until now.
    Anyway:
    1) Set your hostname to mail.theimageengine.com. The command hostname should output the same thing. hostname -s should give you mail
    2) Tell pairnic.com to add an A record for mail.theimageengine.com and www.theimageengine.com and theimageengine.com to point to your IP.
    3) Tell them to use mail.theimageengine.com as the MX.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    16
    Rep Power
    0
    Ok, we're almost there.

    At pairnic.com they have a form to add an MX Record. Here is what I entered:

    Hostname: mail.theimageengine.com
    Priority: 0
    Mail Server: theimageengine.com

    Correct?


    By the way under Linux (SuSE at least)

    hostname returns my-hostname (not my-hostname.mydomain.com)

    hostname -l returns my-hostname.mydomain.com

    dnsdomainname returns mydomain.com

    and domainname returns nothing.

    -Douglass
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    No, your mail server should be the same as its hostname as mail.theimageengine.com. Like I said in my previous post, your domain is theimageengine.com, not com.
    hostname -l returns my-hostname.mydomain.com
    Then your suse has a different hostname. It doesn't matter so long as you set your system hostname to mail.theimageengine.com
    Last edited by freebsd; December 30th, 2003 at 11:01 AM.

IMN logo majestic logo threadwatch logo seochat tools logo