The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Domain pointing to another site

Discussion in 'General Discussion' started by toleroalgorila, Dec 15, 2006.

  1. toleroalgorila

    Joined:
    Dec 14, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    How do I setup a domain so it points automatically to a site outside of my server? I don't want to do this wiht htaccess o meta-refresh, but directly via DNS.

    Thanks in advance!!
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    You could add a CNAME in the dns record.

    domain.com. 14400 IN CNAME newlocation.com.

    don't forget the period at the end of the domain names.

    If you have a specific IP address to use then just change
    the A record to the proper address instead of adding the CNAME.
     
  3. fingerprn

    fingerprn Member

    Joined:
    Feb 19, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    I just tried doing the suggestion above and got an error. It highlighted my entry with the following:

    mydomain.com. 14400 IN CNAME mydomain.otherserver.com.
    mydomain.com: CNAME and other data

    Any ideas? I guess the explaination what supposed to be "mydomain.com: CNAME and other data" but that doesn't mean a thing to me.
     
    #3 fingerprn, Jul 19, 2007
    Last edited: Jul 19, 2007
  4. fingerprn

    fingerprn Member

    Joined:
    Feb 19, 2007
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Okay I got ther following info from another site:

    That's helps a little, but I still can't seem to get this to work. Everytime I remove a record entry (like the A record) I get the same message. I guess I'll just keep removing records until something either works or breaks.

    Any other ideas of what is going on?
     
  5. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,280
    Likes Received:
    36
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Short answer - you can't have a CNAME for a domain if there are other records for that domain. It's sad but truth with the way Bind works.

    So if you have a domain called 'test.com' you can't have

    test.com. IN CNAME somewhereelse.com.

    Because there cannot be other 'records' for an entry that also has a CNAME. And for the domain test.com other records already exist, like NS records and the SOA.

    CNAMEs can't co-exist with other records (it defeats the purpose of defining a CNAME in the first place)
    You cannot combine CNAME with anything else (except SIG when we are doing DNSSEC)

    CNAMEs can't co-exist with other record types, so, by inference, you can't have a CNAME be the same as a zone name, since a zone has at least an SOA record (and, arguably, at least one NS record as well), and the CNAME can't co-exist with it. Just use an A record and be happy.

    Indicates that you have a domain name in your zone data that owns both a CNAME record and a record of another type.


    Of course, you could add a cname like this:

    www.test.com. IN CNAME somewhereelse.com.

    And in most instances, you usually want a CNAME to redirect a website elsewhere - so at least www.test.com can have a CNAME.

    Check out - http://www.isc.org/index.pl?/sw/bind/FAQ.php
    - search that document for 'CNAME and other data'

    Mike
     
    #5 mtindor, Jul 19, 2007
    Last edited: Jul 19, 2007
Loading...

Share This Page