Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cname entire domain (or dname?)

Status
Not open for further replies.

btaber

Programmer
May 26, 2002
307
US
I need to forward an entire domain like here.com to there.com so if I lookup here.com I get there.com or if I look up I get I can already do the but I need the root name to forward also.. what would the hosts file look like? I am using Bind 9.2.1 on linux
 

here.com IN CNAME there.com

Chris

**********************
Chris A.C, CCNA, CCSA
**********************
 
I had tried that and I had read that document already. BIND won't load the zone saying "CNAME and other data" or something like that. What you said chris was the first thing I did, looks like it should work. As for that doc, it only really talks about standard cnames like www, but not the entire domain... I tried DNAME and that forwarded the entire zone to the other one, except for the main name... it doesen't make sense...
 
A CNAME should work as long as your zone files are in order. Seeing the two zone files and the exact error messages might help.

I might set this up myself on my server and see what happens.

Chris.

**********************
Chris A.C, CCNA, CCSA
**********************
 
The error I get is:

dns_master_load: /var/named/here.com.hosts:10: here.com: CNAME and other data
zone here.com/IN: loading master file /var/named/here.com.hosts: CNAME and other data


The zone looks like:
$ttl 38400
here.com. IN SOA ns1.there.com. dns.there.com. (
1113785646
300
3600
604800
38400 )
@ IN NS ns1.there.com.
@ IN NS ns2.there.com.
here.com. IN CNAME there.com.
IN CNAME

If I didn't try it, I would have looked at that and said "yea, that will work", but...

:)
 
Yeah, I'm getting the same thing.

May 13 21:08:28 uranium named[670]: dns_master_load: /var/named/db.here.com:9: here.com: CNAME and other data
May 13 21:08:28 uranium named[670]: zone here.com/IN: loading master file /var/named/db.here.com: CNAME and other data

Well, if you know what IP address there.com resolves to, why not just put an A record in for here.com to the same IP address?

Chris.

**********************
Chris A.C, CCNA, CCSA
**********************
 
Right, you can't do this with a CNAME as I suggested as there.com as other records associated with it (NS and SOA) so you can't use it to the right of a CNAME. You should just use an A record for here.com.

Chris.

**********************
Chris A.C, CCNA, CCSA
**********************
 
That is what I ended up doing... The problem is I have 50 domains to do that to.... oh well...
 
Better get started then ;-)

Chris.

**********************
Chris A.C, CCNA, CCSA
**********************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top