How can I setup DKIM for a Subdomain while using the DNS Manager?

I am setting up DKIM. It works for my domain, example.com:

# opendkim-testkey -d example.com -s 201901

However when I try to use DKIM for my subdomain, subdomain.example.com, I get an error:

# opendkim-testkey -d subdomain.example.com -s 201902

opendkim-testkey: '201902._domainkey.subdomain.example.com' record not found

My zone looks like this (I have removed main entries for clarity) :

example.com [1245900]
$TTL 86400
@    IN  SOA ns1.linode.com. somebody.example.com. 2019072781 14400 14400 1209600 86400
@        NS  ns1.linode.com.
@        NS  ns2.linode.com.
@        NS  ns3.linode.com.
@        NS  ns4.linode.com.
@        NS  ns5.linode.com.
@            MX  10  example.com.
201901._domainkey  TXT 300 ("v=DKIM1\059 h=sha256\059 s=email\059 p="klasdjflajkhafrhjbvcjahvjh..." "klasdjflajkhafrhjbvcjahvjhHGkjhdh..." )
201902._domainkey  TXT 300 ("v=DKIM1\059 h=sha256\059 s=email\059 p="klasdjflajkhafrhjbvcjahvjh..." "klasdjflajkhafrhjbvcjahvjhHGkjhdh..." )

1 Reply

In order to create a DKIM record for the subdomain in the DNS Manager, you will first need to create a new domain in the DNS Manager for subdomain.example.com.

The Linode Cloud Manager does not support the addition of a subdomain on top of an existing subdomain in the same domain zone. For example, if you have example.com as a domain with an A record for subdomain.example.com, you cannot create another.subdomain.example.com within that same domain zone.

Instead, add the subdomain to the Cloud Manager as a separate domain with its own domain zone and DNS records. Then add an A/AAAA record for the second-level subdomain. In the previous example, you would create a domain zone named subdomain.example.com, the create an A/AAAA record with hostname another inside of it.

You can then put your 201902._domainkey TXT record in the subdomain.example.com. zone.

For more information, see https://www.linode.com/docs/platform/manager/dns-manager/#subdomains

I hope this helps!!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct