AFP548 Changing the world one server at a time.

default DNS zone entries

Home › Forums › OS X Server and Client Discussion › DNS › default DNS zone entries

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #355526
    Anonymous
    Participant

    so here’s another one for all those DNS jedi out there.

    how do you set up your web server to default a http://example.com to resolve to http://www.example.com?

    I am under the impression that this is done in the DNS setup with some CNAME and/or A record voodoo. Please advise.

    for what it’s worth, I am using webmin for the BIND DNS administration.

    #355628
    Camelot
    Participant

    In terms of the actual DNS records required to make this work:

    In your zone file, at the beginning you’ll have something like this:

    example.com           IN SOA  ns.example.com. admin.example.com. (
                                    2003051701 ; serial
                                    10800      ; refresh (3 hours)
                                    3600       ; retry (1 hour)
                                    604800     ; expire (1 week)
                                    14400      ; minimum (4 hours)
                                    )
                            NS      ns.example.com.
                            NS      ns2.example.com.
                            MX      10 mail.example.com.
                            A       12.34.56.78

    Note the last line. It creates an A record for the domain entry ‘example.com’ and equates ‘example.com’ to 12.34.56.78

    Then you can add a CNAME for www:

    www       IN    CNAME  example.com.

    This points ‘www.example.com’ to ‘example.com’, so now http://example.com/ and http://www.example.com/ will match.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.