URL Forwarding

Owen McShane omcshane at vianetworks.co.uk
Fri Oct 10 13:25:49 UTC 2003


> I have 2 domain names, siteA.com  and siteB.com
> I would to forward siteB.com to SiteA.com so that whenever siteB.com is
> requested, it automatically ends up at siteA.
> in the zone record for siteB.com I propose to do the following, please tell
> me if this is the correct way to accomplish this:
> 
> 
> $ORIGIN siteB.com
> $TTL 86400
> @     IN     SOA    dns1.domain.com.     hostmaster.domain.com. (
>                     2001062501 ; serial
>                     21600      ; refresh after 6 hours
>                     3600       ; retry after 1 hour
>                     604800     ; expire after 1 week
>                     86400 )    ; minimum TTL of 1 day
> 
>       IN     NS     dns1.domain.com.
>       IN     NS     dns2.domain.com.
> 
> 
> www          IN     CNAME   siteA.com
> 
> WOULD there need to be any other directive to add to the above zone file to
> accomplish this goal? ot is this altogether incorrect. If so what is the
> proper way to do this. Again all I want ot do is to forward www.siteB.com
> to www.siteA.com

www		IN	CNAME	www.siteA.com.

would give www.siteA.com the same IP as www.siteA.com (note the trailing . is essential, otherwise it would equate to www.siteA.com.siteB.com)

Bear in mind that the web server will need to be accepting requests for that host header also.

Owen


More information about the bind-users mailing list