Hosts File Windows Server 2003 Machine adding an alias

Posted on 2012-09-17
Last Modified: 2015-08-18
I would like to use enter an alias in a host file on a server 2003 machine. I found the following example. Does this seem right?

c:\widnows\system32\drivers\etc\hosts         localhost localhost.localdomain   illiad   cdlc-union

illiad is the host name
cdlc-union is the alias

3 questions.
1.  Is the line correct given that the machine's  name is illiad and the domain is

2. Do I need to include the domain in the names of the hosts on line?
3. Am I completelhy off base?

Question by:notcjw
    LVL 77

    Accepted Solution

    1.  Is the line correct given that the machine's  name is illiad and the domain is no the correct form is below
    2. Do I need to include the domain in the names of the hosts on line?
    no you put whatever you want to refer it as on hosts line
    3. Am I completelhy off base?

    Yes, the format is ip-address and then whatever you whatever name you want to refer to the ip-address as. Note: this information is only applicable for the specific machine that this hosts file is on. localhost   cdlc-union

    Expert Comment

    Yes, that example is correct.  The way you have it there. cdlc-union will alias to illiad.
    LVL 26

    Expert Comment

    by:Leon Fester
    When working with a hosts file, you don't need to create alias records like you would a CNAME in a DNS console.

    The HOSTS just needs the server name and the IP.
    All you need is:
    [IP ADDRESS]    [HostName]
    where [IP ADDRESS] is the IP for the host
    [HostName] is the name that you want to reference. It can be a FQDN or a Netbios name.

    Here is the intro text from a standard hosts file:
    # Copyright (c) 1993-2009 Microsoft Corp.
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
    When working with Microsoft SCVMM (System Center Virtual Machine Manager) in a Hyper-V virtualization environment, we have run across scenarios in which the failed migration of a VM from one host to another may leave the VM in a failed state. Specif…
    This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now