#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    4
    Rep 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?
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,113
    Rep Power
    9398
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Location
    Florida
    Posts
    248
    Rep Power
    4
    What does the zone file for myotherdomain.net look like? And yeah, the actual domain might help find the issue quicker.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    4
    Rep 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
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    4
    Rep 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>
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Location
    Florida
    Posts
    248
    Rep Power
    4
    What does dig sub0.mydomain.com show?
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Posts
    4
    Rep Power
    0
    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.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Location
    Florida
    Posts
    248
    Rep Power
    4
    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.
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2011
    Posts
    7
    Rep 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.

IMN logo majestic logo threadwatch logo seochat tools logo