Whats the difference between CNAMES and Sub-Domains?

Posted on 2008-11-07
Last Modified: 2013-12-24
were these subdomains set up as CNAMEs through your Control
Panel or as simple subdomains? This is my web host where am hosting my website and trying to create a subdomain that will forward to some other destination URL but while this happens the browser should show my subdomain as the destination URL and not the one which it has been forwarded to.

Please let me know how to achieve this?
Question by:Jeffreym17
    LVL 58

    Expert Comment



    A CNAME and Subdomain are two very different concepts. A CNAME is a concept in the Domain Name System (DNS), which essentially enables you to create an alias from one domain to another. For example, I could create a CNAME record called, and set it as an alias for Whenever anyone visits, they will instantly be taken to the main site, since DNS will resolve the IP address of the main site rather than the subdomain. Using CNAME records is good in some cases, primarily because it takes load off the web server - it is not the web server which does the redirection, in fact no traffic must pass through the web server until you reach, so it is good performance-wise.

    A subdomain is a completely separate website in its own right. In the DNS system, creating a subdomain would create an A record in DNS mapping that subdomain to a physical web server IP. Whether the IP of the server hosting the subdomain and the IP of the server hosting the main site is the same, or different, it does not matter, since they are completely separate entities in their own right.

    In this case, since you want to redirect between two pages, I would probably go with the subdomain route, rather than the A record approach. This is primarily because at a web host, your main site (which you redirect to) will only listen on one particular domain name - the main site's domain - and trying to resolve it through a CNAME would probably fail.

    Once you create your subdomain, you'd want to use either the host's in-built functions to specify a redirection target, or upload a small piece of code to redirect for you. There is plenty redirection code which can be found online.


    Author Comment

    Hello tigermatt,

    Thanks for the effort you took to put down the details answering my question. And although I have understood a lot because of you, But as am confused because of my host responses. Please if possible can you put down the exact steps to be followed to achieve the following:

    1) When the USER types
    2) The page that displays to the USER is from
    3) But in the end of the process the address bar should show up as to the USER

    I mean should I used CNAME or Subdomain to reach out to my expectations?



    Author Comment

    Hi there again,

    Look I have successfully reached the second step mentioned in my above POST.

    But will be glad if you can give me all the possible ways to reach out to the third step.
    LVL 58

    Accepted Solution


    I would suggest you try a CNAME to start with.


    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    If you want to move up through the ranks in your technology career, talent and hard work are the bare necessities. But they aren’t enough to make you stand out. Expanding your skills, actively promoting your accomplishments and using promotion st…
    Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
    Articles on a wide range of technology and professional topics are available on Experts Exchange. These resources are written by members, for members, and can be written about any topic you feel passionate about. Learn how to best write an article t…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    779 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

    17 Experts available now in Live!

    Get 1:1 Help Now