Friday, November 11, 2011

DNS Redirection

This is actually pretty simple, but it can seem complicated if you don't know what you're doing.

Use Case:
You want domain A to point to domain B.

First I assume you have a domain name hosted by some entity somewhere. On that entity you need to set up a CNAME (canonical name) record and an A (address) record. The CNAME record should resolve to the URL of where you want domain A to point to. e.g. rappincowboy.com -> chrissand.net Then you need the A record associated with that CNAME. rappincowboy.com -> 50.23.38.194

OK. Now the last thing to do on the host that controls your domain name is to point to it's nameserver. You do this so that the authority on this name is the host that actually knows you've changed something.

Now on the box where you've got domain B you need to let it know that you've got a domain (A) comin' in to the party. The terminology for this is sometimes a 'parked' domain even though it is still active. Basically, look around to let the machine know that domain A is coming in and that is ok.

Other things that may prove useful -
nslookup : unix tool to do a lookup on the nameserver for the records associated with the domain you're interested in. It should return the canonical name (CNAME) record. This will let you know if you've done your job on the record part. If you get stuck in the middle of this process, the name will redirect, but the other machine may not accept the incoming traffic.

Feel free to ask questions - this blog is as much for me as it is for you.