Redirect Domain with CNAME, but leave Subdomain

Kevin Darcy kcd at daimlerchrysler.com
Fri Nov 10 03:53:46 UTC 2006


susikaufmann2003 at hotmail.com wrote:
> Hello,
>
> i have the following problem: I am hosting a domain and now I want to
> redirect nearly everything, but leave the mail-transfer and one
> subdomain on my server.
>
> E.g.: mail.mydomain.com, mysubdomain.mydomain.com should be left on my
> server, but everything else, e.g. www.mydomain.com should be done by
> another server www.other.com (CNAME).
>
> now:
>
> mydomain.com.      86400  IN   A         xx.xx.xx.xx
>   
Change that A record to the address of the other server. Unfortunately 
it's not legal to CNAME the name of an actual zone. So you'll have to 
keep this A record in sync with any changes that are made to the 
www.other.com A record.
> *.mydomain.com.   86400  IN   A         xx.xx.xx.xx
>   
*.mydomain.com. 86400 cname www.other.com.
> www.mydomain.com.   86400  IN  CNAME         www.other.com.
>   
Not needed, since it's covered by the wildcard above.
> mydomain.com.     86400   IN   MX 10   mail.mydomain.com.
>   
Change the MX target to the name of the new mail server.
> mydomain.com.     86400   IN   NS        ns.blabla.com.
> mydomain.com.     86400   IN   NS        ns2.blabla.com. 
>   
Can't use CNAMEs for these either. You'll need to point them at the new 
nameservers. Don't forget to change your delegation records too, via 
your domain registrar. Your delegation NS records and apex NS records 
should match. Since delegation changes sometimes take a while to 
process/propagate, you'll probably want the zone to continue to be 
served on both the old and new nameservers during the transition. After 
the transition, don't forget to get the zone deleted from the old 
servers, otherwise other nameservers may get "locked" into using a stale 
version of the zone for some period of time afterwards (or you could 
make the old servers into stealth slaves I guess, that would work too).

                                                                      - 
Kevin



More information about the bind-users mailing list