Dec 14, 2006
9
0
151
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!!
 

jayh38

Well-Known Member
Mar 3, 2006
1,213
0
166
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.
 

fingerprn

Active Member
Feb 19, 2007
30
1
156
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.
 
Last edited:

fingerprn

Active Member
Feb 19, 2007
30
1
156
Okay I got ther following info from another site:

"CNAME and other data"

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.
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?
 

mtindor

Well-Known Member
Sep 14, 2004
1,361
64
178
inside a catfish
cPanel Access Level
Root Administrator
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.
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
 
Last edited: