The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> DNS
|
Bind CNAMEs not working properly
Discuss Bind CNAMEs not working properly in the DNS forum on Dev Shed. Bind CNAMEs not working properly DNS forum discussing issues, servers, and configurations. The Domain Name System (DNS) is what the Internet uses to translate website names into IP addresses.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

August 25th, 2011, 03:48 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 4
Time spent in forums: 48 m 24 sec
Reputation Power: 0
|
|
|
Bind CNAMEs not working properly
I am trying to get these CNAMEs to work properly:
Code:
mail IN CNAME mydomain.com.
www IN CNAME mydomain.com.
ftp IN CNAME mydomain.com.
sub0 IN CNAME sub0.myotherdomain.net.
sub1 IN CNAME sub0.myotherdomain.net.
sub2 IN CNAME sub0.myotherdomain.net.
sub3 IN CNAME sub0.myotherdomain.net.
sub4 IN CNAME sub1.myotherdomain.net.
sub5 IN CNAME sub1.myotherdomain.net.
sub6 IN CNAME sub1.myotherdomain.net.
sub7 IN CNAME sub1.myotherdomain.net.
sub8 IN CNAME sub1.myotherdomain.net.
The part that's not working is when I try to visit "sub0.mydomain.com", It displays the "mydomain.com" page in the web browser instead of the "sub0.myotherdomain.net" page.
What is wrong here?
|

August 25th, 2011, 04:55 PM
|
 |
Still alive
|
|
Join Date: Mar 2007
Location: Washington, USA
|
|
|
What's the actual domain name?
|

August 25th, 2011, 05:33 PM
|
|
Contributing User
|
|
Join Date: Nov 2010
Location: Florida
Posts: 248
 
Time spent in forums: 3 Days 15 h 26 m 11 sec
Reputation Power: 3
|
|
|
What does the zone file for myotherdomain.net look like? And yeah, the actual domain might help find the issue quicker.
|

August 25th, 2011, 07:40 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 4
Time spent in forums: 48 m 24 sec
Reputation Power: 0
|
|
This is for a client so I cannot reveal the actual domain name.
myotherdomain.net is actually on another server that I don't have access to but it's setup correctly; they have no issues, the issue is on my side. In fact, there are other people using it exactly like I am trying to. Going directly to sub0.myotherdomain.net shows the correct page.
Doing a `dig sub0.myotherdomain.net` reveals this though:
Code:
;; QUESTION SECTION:
;sub0.myotherdomain.net. IN A
;; ANSWER SECTION:
sub0.myotherdomain.net. 300 IN A #.#.#.5
;; AUTHORITY SECTION:
myotherdomain.net. 300 IN NS ns1.removed.com.
myotherdomain.net. 300 IN NS ns2.removed.com.
;; ADDITIONAL SECTION:
ns1.removed.com. 1344 IN A #.#.#.1
ns2.removed.com. 1344 IN A #.#.#.2
|

August 25th, 2011, 07:41 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 4
Time spent in forums: 48 m 24 sec
Reputation Power: 0
|
|
(couldn't include in previous post due to: Could not find phrase 'akismetspam'.)
Here's my full zone:
Code:
; Zone file for mydomain.com
$TTL 14400
$ORIGIN mydomain.com.
@ 86400 IN SOA ns1.mydomain.com. webmaster.mydomain.com. (
2011082500 ; serial, todays date+todays
43200 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds
IN A #.#.#.#
IN NS ns1.mydomain.com.
IN NS ns2.mydomain.com.
ns1 IN A #.#.#.#
ns2 IN A #.#.#.#
smtp IN A #.#.#.#
localhost.smtp IN A 127.0.0.1
smtp IN MX 10 mydomain.com.
mail IN CNAME mydomain.com.
www IN CNAME mydomain.com.
ftp IN CNAME mydomain.com.
sub0 IN CNAME sub0.myotherdomain.net.
sub1 IN CNAME sub0.myotherdomain.net.
sub2 IN CNAME sub0.myotherdomain.net.
sub3 IN CNAME sub0.myotherdomain.net.
sub4 IN CNAME sub1.myotherdomain.net.
sub5 IN CNAME sub1.myotherdomain.net.
sub6 IN CNAME sub1.myotherdomain.net.
sub7 IN CNAME sub1.myotherdomain.net.
sub8 IN CNAME sub1.myotherdomain.net.
<spf/rsa removed>
|

August 25th, 2011, 08:30 PM
|
|
Contributing User
|
|
Join Date: Nov 2010
Location: Florida
Posts: 248
 
Time spent in forums: 3 Days 15 h 26 m 11 sec
Reputation Power: 3
|
|
|
What does dig sub0.mydomain.com show?
|

August 25th, 2011, 09:16 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 4
Time spent in forums: 48 m 24 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by CaptPikel What does dig sub0.mydomain.com show? |
Code:
;; QUESTION SECTION:
;sub0.mydomain.com. IN A
;; ANSWER SECTION:
sub0.mydomain.com. 14400 IN CNAME sub0.myotherdomain.net.
|

August 25th, 2011, 10:09 PM
|
|
Contributing User
|
|
Join Date: Nov 2010
Location: Florida
Posts: 248
 
Time spent in forums: 3 Days 15 h 26 m 11 sec
Reputation Power: 3
|
|
|
If your server isn't following the CNAME and you haven't explicitly configured it to do that, then your server is most likely unable to resolve the target name. Was the status of that dig for the alias anything other than NOERROR? You don't have recursion set to NO in named.conf? Are any other name servers having the same problem with resolution or just yours? You've flushed cache? People here may be able to tell more with the actual domain names in question, but without those it's just guesswork.
|

September 16th, 2011, 08:00 PM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 7
Time spent in forums: 4 h 20 m 15 sec
Reputation Power: 0
|
|
|
Try adding A records for otherdomain names before cnames resource records - hope it fix your problem, and seems recursion is disabled on your dns server.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|