Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    3

    Default Point CNAME subdomain to main domain

    I need to create a CNAME record like cdn.example.com that points to example.com. I need the following functionality:
    when someone asks for cdn.example.com , the server to return the contents of example.com

    in WHM i entered a new field like this

    cdn 14400 IN CNAME example.com
    (i also tried cdn.example.com)

    unfortunately, when i access cdn.example.com i get the default apache webpage, and not the homepage of example.com

    i know it works if i add cdn.example.com as a parked domain, but i don't want to do it like this, as i think it may involve extra DNS requests when accessing cdn.example.com (pls correct me if i'm wrong on this).

    I think the main issue is being able to point the cdn.example.com CNAME to the root folder of example.com on the server. Is it possible to do this without parking cdn.example.com?

    thanks!

  2. #2
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    1,346
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Point CNAME subdomain to main domain

    Hello

    i know it works if i add cdn.example.com as a parked domain, but i don't want to do it like this, as i think it may involve extra DNS requests when accessing cdn.example.com (pls correct me if i'm wrong on this).
    Parked domains do not result in additional DNS requests. A separate DNS Zone is created for the parked domain name, which is used in the same manner the original DNS Zone would be.

    As for the CNAME issue, please ensure you are using a trailing "." after "example.com". EX:

    Code:
    cdn 14400 IN CNAME example.com.
    Thank you.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    3

    Default Re: Point CNAME subdomain to main domain

    yup. i know about the dot it's not working.

    what if i create the cdn.example.com subdomain from cpanel and then edit in WHM > Edit DNS Zone and transform the cdn entry from
    cdn ... A IP
    into
    cdn ... CNAME example.com.

  4. #4
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    1,346
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: Point CNAME subdomain to main domain

    Hello
    what if i create the cdn.example.com subdomain from cpanel and then edit in WHM > Edit DNS Zone and transform the cdn entry from
    That should not be necessary. Could you open a support ticket for this issue so we may see the actual domain used and the entries that have been setup in the DNS Zone?

    Submit A Ticket

    Thank you.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

Similar Threads & Tags
Similar threads

  1. How can I Set a domain to point to different IP and mail to main IP
    By kran in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 10-14-2008, 10:17 PM
  2. Can I point a parked domain to a folder on the main domain?
    By rligg in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 04-04-2008, 12:12 PM
  3. Point domain towards subdomain
    By jcallery in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-30-2005, 07:18 PM
  4. How to point Parked domain to Main domain
    By gopal in forum cPanel Developers
    Replies: 2
    Last Post: 12-22-2004, 07:08 PM
  5. Wanting subdomain to point to main directory
    By Shamele in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-13-2004, 06:21 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube