0

I am using example.org in this question only as an example. In my real zone file, I have a real domain instead of example.org.

This is how my zone file looks right now.

$TTL 14400
@   IN  SOA ns1.linode.com. example\.org.gmail.com. 2017061008 14400 14400 604800 14400
@       NS  ns1.linode.com.
@       NS  ns2.linode.com.
@       NS  ns3.linode.com.
@       NS  ns4.linode.com.
@       NS  ns5.linode.com.
@           A   101.101.101.101
www         A   101.101.101.101
@           AAAA    1001:1001::1001:1001:1001:1001
www         AAAA    1001:1001::1001:1001:1001:1001
www.example.com         CNAME   example.org.
www.example.net         CNAME   example.org.

Do you see anything incorrect in this zone file?

I ask this because nslookup of example.org and www.example.org succeeds but nslookup of www.example.com and www.example.net fails. What am I missing?

Note 1: I have registered example.com, example.org as well as example.net and in their whois information, the Name Server fields are pointing to ns1.linode.com, ns2.linode.com, etc.

Note 2: I am managing my zone using the Linode DNS Manager web-based interface. The output block above is obtained from the zone dump that Linode DNS Manager provides me.

Lone Learner
  • 103
  • 1
  • 8

3 Answers3

4

That is not possible. In the zone example.org, you can only define records for that domain.

You would have to define the record www.example.com in the zone file for example.com.

Sven
  • 97,248
  • 13
  • 177
  • 225
1

You need to have www.example.com. CNAME (or www CNAME) in the zone file for the same domain example.com.. Without the tailing dot you'd just speficy a subdomain for the (currently missing) $ORIGIN, e.g. www.example.com.example.org.

The canonical name CNAME creates an alias of any record, not only A. Therefore, I'd recommend using www.example.com. CNAME www.example.org. instead of the plain domain in order to avoid aliasing possible MX, TXT etc.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122
-1
www.example.com         CNAME   example.org.
www.example.net         CNAME   example.org.

Is wrong as I think - in this case You have defined something like that:

www.example.com.example.org 
www.example.net.example.org

If You want to point www.example.net and www.example.com to IP declared for example.org you should add dots at end eg:

www.example.com.         CNAME   example.org.
www.example.net.         CNAME   example.org.