2 domains, one nameserver...

Barry Margolin barmar at genuity.net
Thu Nov 8 15:25:54 UTC 2001


In article <9sdvul$7er at pub3.rc.vix.com>,
Pedro Fonseca <pedro.fonseca at iscte.pt> wrote:
>
>Greetings.
>
>Sorry if this is kind of lame, but every example I saw so far is how to do a
>zone file for one domain. I have a main domain 'pedrofonseca.com' and now a
>have another one: 'pedrofonseca.net'.
>
>When someone writes down http://www.pedrofonseca.net I would like that it
>would be redirected to www.pedrofonseca.com.
....
>How should I do to make www.pedrofonseca.net the same as
>www.pedrofonseca.net? I tried this in the 'db.pedrofonseca.net' (although it
>didn't work):
>
>@  IN SOA ns1.pedrofonseca.com. webmaster.pedrofonseca.com. (
>  2001110802 ; Serial
>  600  ; Refresh after 10 minutes
>  1800  ; Retry after 30 minutes
>  604800  ; Expire after 1 week
>  600 )  ; Minimum TTL of 10 minutes
>
>  IN NS ns1.pedrofonseca.com.
>  IN MX 10 ono.pedrofonseca.com.
>
>  www IN CNAME www.pedrofonseca.com.
>
>Can this be done, or am I completely looking in the wrong place and this
>should be done with a redirect directive in Apache?

This is everything you need to do in DNS.

If the machine hosts virtual servers, you will have to have both names in
its virtual host configuration.  Otherwise, when a request comes in for
www.predrofonseca.net it won't know which directory it should go to, and it
will probably use a system-wide default instead of going to your virtual
server.

-- 
Barry Margolin, barmar at genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list