getting CNAME to work for www.domain.com equals domain.com on http line
Chris Buxton
cbuxton at menandmice.com
Tue Mar 11 05:18:13 UTC 2008
I don't really understand the question, but it sounds like you're
looking to have the URL change in the web browser based on DNS
records. That isn't how it works.
If you want both "domain" and "www.domain" to work in the browser,
then either create two A records (one for each) or make "www.domain"
an alias (a CNAME record) of "domain". The effect, for web browsers,
is essentially identical - the browser doesn't care about the CNAME
record, it just wants the IP address.
If you want one to change to the other in what is displayed in the URL
field of the web browser, you must do this at the HTTP level, with an
HTTP 302 response (if I recall correctly).
Chris Buxton
Professional Services
Men & Mice
On Mar 9, 2008, at 8:43 AM, Jeff wrote:
> Ive read post after post about this topic and I still cant seem to get
> it working.
> Here is my file, can someone tell me what is wrong to get make:
>
> www.domain.com == domain.com on the http line?
>
> $TTL 86400
> domain.com. 1D IN SOA www.domain.com. ns1.domain.com. (
> 5 ; serial
> 1H ; refresh
> 15M ; retry
> 1W ; expiry
> 1D ) ; minimum
> ;
> ; for pings etc
> domain.com. IN A xx.xx.xx.xx
>
> ;
> ; Nameservers
> 1D IN NS ns1.domain.com.
> 1D IN NS ns2.domain.com.
>
> ; Canonical names
> ns1 IN A xx.xx.xx.1
> ns2 IN A xx.xx.xx.2
> ; BEFORE CNAME - www IN A xx.xx.xx.xx
> mail IN A xx.xx.xx.xx
>
> ; PTR
> 1 IN PTR ns1.domain.com.
> 2 IN PTR ns2.domain.com.
> ; 3 IN PTR www.domain.com.
> 4 IN PTR mail.domain.com.
> 5 IN PTR domain.com.
>
> ; MX
> domain.com. IN MX 1 mail.domain.com.
>
> ; CNAME
> www.domain.com. IN CNAME domain.com.
>
> Thanks
>
More information about the bind-users
mailing list