cname help

Discussion in 'OT Technology' started by axio, Nov 19, 2006.

  1. axio

    axio New Member

    Joined:
    May 8, 2004
    Messages:
    4,001
    Likes Received:
    0
    Location:
    Houston
  2. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Not really a good example - the example.com is your root domain, which is your A record. www.example.com could be created as a cname for example.com, or ftp.example.com, webmail.example.com... etc. This would mean all of your services would be hosted by the same server (or at least the same firewall external IP). Think of a cname as an alias for an A record. The advantage over just creating a whole pile of A records is that if your public IP changes, you change ONE A record, instead of a whole bunch of them.
     
  3. RubiconSahara

    RubiconSahara OT Supporter

    Joined:
    Mar 30, 2000
    Messages:
    7,672
    Likes Received:
    0
    Location:
    Edmond, OK
    Why not use a redirect script in your home directory? You don't want to mess with your example.com A record. Here is an index.html redirect I use frequently. Be sure to keep the padding.

    Code:
    <HTML>
    <HEAD>
    <dtml-call "RESPONSE.setHeader('pragma','no-cache')">
    <dtml-call "RESPONSE.setHeader('Expires',(_.DateTime()-1).rfc822())">
    <META HTTP-EQUIV="Refresh" content="0;URL=http://m.example.com">
    
    <!--
    Padding for IE
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    xxxxxxxxxx xxxxxxxxxx xxxxxxxxxxx xxxxxxxxxx xxxxxxxxxx xxxxxxxxx xxxxxxxxxx
    --> 
    </HEAD>
    </HTML> 
    
    
     
  4. axio

    axio New Member

    Joined:
    May 8, 2004
    Messages:
    4,001
    Likes Received:
    0
    Location:
    Houston
    I was going to use a redirect script, but I was wondering if there was a way to make it work through CNAME/A also.
     
  5. RubiconSahara

    RubiconSahara OT Supporter

    Joined:
    Mar 30, 2000
    Messages:
    7,672
    Likes Received:
    0
    Location:
    Edmond, OK
    short answer - no

    you can with www. but not without it.

    Now if you had access to the httpd.conf (unix server) file you could manually map the domains to that folder.
     
  6. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    I don't know why you don't want to change your A record...
     
  7. EvilSS

    EvilSS New Member

    Joined:
    Jun 11, 2003
    Messages:
    5,104
    Likes Received:
    0
    Location:
    STL
    So, are you trying to redirect www.example.com to m.example.com or are you trying to redirect anything.example.com to m.example.com?
     
  8. axio

    axio New Member

    Joined:
    May 8, 2004
    Messages:
    4,001
    Likes Received:
    0
    Location:
    Houston
  9. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Well I know within godaddy you can create an A record that catches all unknown subdomains - just create an A record of * that points to the same main IP address.
     

Share This Page