CNAME template

First, a CNAME record should only be used to deliver an IP# over which you have no control. For example, I own 1275domains.com and I want every lookup to www.1275domains.com to return the IP# for doma206681.supersite.myorderbox.com. If I controlled the IP# of doma206681.supersite.myorderbox.com, I'd simply use an A record pointing to the same IP#, since if I ever needed to change the IP# I could just change it in both A records.

However I do not control the IP# for doma206681.supersite.myorderbox.com; it's NOT my domain. And I have no idea when and if the IP# may change. So I use a CNAME record, pointing www.1275domains.com to doma206681.supersite.myorderbox.com.

Now, whenever any resolver sends a request for an A record for www.1275domains.com it gets a CNAME record instead. Then the resolver does another A record lookup, this time for doma206681.supersite.myorderbox.com, and returns the result of that record as the A record for the original www.1275domains.com.

From the DirectAdmin control panel:

For example, as in the above case, I put www into the left field
and on the right side, the entire URL (followed by a period (dot) for which I want the A record returned: doma206681.supersite.myorderbox.com.

This ends up in the zone file as follows:
Code:
www.1275domains.com.    600     IN      CNAME   doma206681.supersite.myorderbox.com.
and whenever anyone types www.1275domains.com into their browser, their system returns the IP# for doma206681.supersite.myorderbox.com, which is the desired behavior.

Note that I use 600 as a TTL; your TTL may differ.

If you actually follow the link above you'll see that the browser shows the domain as being my site at www.1275domains.com. And you'll also see my other Albert Einstein image :).

Jeff
 
Back
Top