[GH-ISSUE #96] "Check Records" says CNAME default._domainkey record not found #692

Closed
opened 2026-03-14 10:10:42 +03:00 by kerem · 15 comments
Owner

Originally created by @crazy-max on GitHub (Nov 9, 2020).
Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/96

Hi,

When I want to "Check Records" I've got:

CNAME default._domainkey record not found. This could be due to DNS caching, please try again later.

But the record exists on Namecheap:

image

Am I missing something?

Originally created by @crazy-max on GitHub (Nov 9, 2020). Original GitHub issue: https://github.com/anonaddy/anonaddy/issues/96 Hi, When I want to "Check Records" I've got: ``` CNAME default._domainkey record not found. This could be due to DNS caching, please try again later. ``` But the record exists on Namecheap: ![image](https://user-images.githubusercontent.com/1951866/98542434-d2a72c80-2288-11eb-9df3-203cee8609cf.png) Am I missing something?
kerem closed this issue 2026-03-14 10:10:47 +03:00
Author
Owner

@h-town commented on GitHub (Nov 16, 2020):

Your DKIM should be configured as a TXT type record that returns a string of data led with v=DKIM1; k=rsa; p=

<!-- gh-comment-id:728388102 --> @h-town commented on GitHub (Nov 16, 2020): Your DKIM should be configured as a TXT type record that returns a string of data led with _v=DKIM1; k=rsa; p=_
Author
Owner

@willbrowningme commented on GitHub (Nov 17, 2020):

Is this for self-hosting or on app.anonaddy.com?

<!-- gh-comment-id:728848719 --> @willbrowningme commented on GitHub (Nov 17, 2020): Is this for self-hosting or on app.anonaddy.com?
Author
Owner

@crazy-max commented on GitHub (Nov 17, 2020):

@willbrowningme Yes self-hosting with our Docker image

<!-- gh-comment-id:728882394 --> @crazy-max commented on GitHub (Nov 17, 2020): @willbrowningme Yes self-hosting with our Docker image
Author
Owner

@willbrowningme commented on GitHub (Nov 19, 2020):

@crazy-max do you have config('anonaddy.domain') set correctly?

$def = collect(dns_get_record('default._domainkey.' . $this->domain . '.', DNS_CNAME))
    ->contains(function ($r) {
        return $r['target'] === 'default._domainkey.' . config('anonaddy.domain');
    });

if (!$def) {
    return response()->json([
        'success' => false,
        'message' => 'CNAME default._domainkey record not found. This could be due to DNS caching, please try again later.'
    ]);
}

Those are the lines that performs the check in the code.

<!-- gh-comment-id:730341062 --> @willbrowningme commented on GitHub (Nov 19, 2020): @crazy-max do you have `config('anonaddy.domain')` set correctly? ```php $def = collect(dns_get_record('default._domainkey.' . $this->domain . '.', DNS_CNAME)) ->contains(function ($r) { return $r['target'] === 'default._domainkey.' . config('anonaddy.domain'); }); if (!$def) { return response()->json([ 'success' => false, 'message' => 'CNAME default._domainkey record not found. This could be due to DNS caching, please try again later.' ]); } ``` Those are the lines that performs the check in the code.
Author
Owner

@crazy-max commented on GitHub (Nov 19, 2020):

@willbrowningme

do you have config('anonaddy.domain') set correctly?

Yes

Those are the lines that performs the check in the code.

I think that's the issue. On Namecheap host and target cannot be the same for CNAME:

image

So default._domainkey / default._domainkey.example.com. does not work.
That's why I've used default._domainkey / example.com..

<!-- gh-comment-id:730417789 --> @crazy-max commented on GitHub (Nov 19, 2020): @willbrowningme > do you have config('anonaddy.domain') set correctly? Yes > Those are the lines that performs the check in the code. I think that's the issue. On Namecheap host and target cannot be the same for CNAME: ![image](https://user-images.githubusercontent.com/1951866/99680069-920f9600-2a74-11eb-8f66-565e8ba45c59.png) So `default._domainkey` / `default._domainkey.example.com.` does not work. That's why I've used `default._domainkey` / `example.com.`.
Author
Owner

@willbrowningme commented on GitHub (Jan 7, 2021):

@crazy-max is this issue still present?

<!-- gh-comment-id:756207611 --> @willbrowningme commented on GitHub (Jan 7, 2021): @crazy-max is this issue still present?
Author
Owner

@crazy-max commented on GitHub (Jan 7, 2021):

@willbrowningme Yes (0.6.2):

Image1

image

DNS records on Namecheap:

Image2

WDYT about what I said in https://github.com/anonaddy/anonaddy/issues/96#issuecomment-730417789?

<!-- gh-comment-id:756290336 --> @crazy-max commented on GitHub (Jan 7, 2021): @willbrowningme Yes (0.6.2): ![Image1](https://user-images.githubusercontent.com/1951866/103928884-5a3bdb00-5114-11eb-8622-bd1126c37325.jpg) ![image](https://user-images.githubusercontent.com/1951866/103928551-e8fc2800-5113-11eb-983f-0ac5a453bd23.png) DNS records on Namecheap: ![Image2](https://user-images.githubusercontent.com/1951866/103928956-763f7c80-5114-11eb-8644-8a90dae71ead.jpg) WDYT about what I said in https://github.com/anonaddy/anonaddy/issues/96#issuecomment-730417789?
Author
Owner

@willbrowningme commented on GitHub (Jan 7, 2021):

Thanks for the screenshots. Hmm, I've not used namecheap to set DNS records before.

Please could you try the following CNAME record:

Host: default._domainkey
Value: default._domainkey.yourdomain.com

Notice the missing period (full-stop) for the value of the record.

I'm not sure why namecheap wouldn't allow that since the host and value are different.

<!-- gh-comment-id:756300890 --> @willbrowningme commented on GitHub (Jan 7, 2021): Thanks for the screenshots. Hmm, I've not used namecheap to set DNS records before. Please could you try the following CNAME record: Host: default._domainkey Value: default._domainkey.yourdomain.com Notice the missing period (full-stop) for the value of the record. I'm not sure why namecheap wouldn't allow that since the host and value are different.
Author
Owner

@crazy-max commented on GitHub (Jan 7, 2021):

@willbrowningme Like I said in https://github.com/anonaddy/anonaddy/issues/96#issuecomment-730417789, I can't:

image

default._domainkey = default._domainkey.example.com. does not work.
Only I can do is default._domainkey = example.com..

<!-- gh-comment-id:756346587 --> @crazy-max commented on GitHub (Jan 7, 2021): @willbrowningme Like I said in https://github.com/anonaddy/anonaddy/issues/96#issuecomment-730417789, I can't: ![image](https://user-images.githubusercontent.com/1951866/103938463-2962a280-5122-11eb-949b-1d83545b4c9f.png) `default._domainkey` = `default._domainkey.example.com.` does not work. Only I can do is `default._domainkey` = `example.com.`.
Author
Owner

@willbrowningme commented on GitHub (Jan 7, 2021):

I just tried to add that record with a domain I have on namecheap and it seems to have worked.

namecheap-record

<!-- gh-comment-id:756355000 --> @willbrowningme commented on GitHub (Jan 7, 2021): I just tried to add that record with a domain I have on namecheap and it seems to have worked. ![namecheap-record](https://user-images.githubusercontent.com/20662079/103939857-5ca63100-5124-11eb-9570-64508ea84a08.png)
Author
Owner

@crazy-max commented on GitHub (Jan 7, 2021):

With the same domain as the zone?

Zone: example.com
CNAME: default._domainkey = default._domainkey.example.com.

<!-- gh-comment-id:756376699 --> @crazy-max commented on GitHub (Jan 7, 2021): With the same domain as the zone? Zone: `example.com` CNAME: `default._domainkey` = `default._domainkey.example.com.`
Author
Owner

@willbrowningme commented on GitHub (Jan 8, 2021):

Okay, I think I understand the issue now.

So let's say you are self-hosting AnonAddy on the domain maindomain.com.

This domain should have default._domainkey set with an actual DKIM value e.g. "v=DKIM1;h=sha256;k=rsa;...."

Then say you want to add a custom domain through the domains page called customdomain.com.

This customdomain.com should have a default._domainkey record of default._domainkey.maindomain.com. so that it uses the same signing key as the maindomain.

In your example above if you are trying to add example.com as a custom domain then the record should point to the default._domainkey on the main domain hosting AnonAddy.

<!-- gh-comment-id:756649262 --> @willbrowningme commented on GitHub (Jan 8, 2021): Okay, I think I understand the issue now. So let's say you are self-hosting AnonAddy on the domain `maindomain.com`. This domain should have `default._domainkey` set with an actual DKIM value e.g. `"v=DKIM1;h=sha256;k=rsa;...."` Then say you want to add a custom domain through the domains page called `customdomain.com`. This `customdomain.com` should have a `default._domainkey` record of `default._domainkey.maindomain.com.` so that it uses the same signing key as the maindomain. In your example above if you are trying to add `example.com` as a custom domain then the record should point to the `default._domainkey` on the main domain hosting AnonAddy.
Author
Owner

@crazy-max commented on GitHub (Jan 8, 2021):

Yes in my case I don't have a custom domain but only use the main domain and I have defined this main domain in the anonaddy interface. Maybe I should not?

image

This domain should have default._domainkey set with an actual DKIM value e.g. "v=DKIM1;h=sha256;k=rsa;...."

About that it should be defined as a TXT record right?:

TXT / s1._domainkey / v=DKIM1;t=s;p=

image

Is there something wrong here in my records?

<!-- gh-comment-id:756816186 --> @crazy-max commented on GitHub (Jan 8, 2021): Yes in my case I don't have a custom domain but only use the main domain and I have defined this main domain in the anonaddy interface. Maybe I should not? ![image](https://user-images.githubusercontent.com/1951866/104032463-186b6d00-51c6-11eb-8529-807a160567f0.png) > This domain should have `default._domainkey` set with an actual DKIM value e.g. `"v=DKIM1;h=sha256;k=rsa;...."` About that it should be defined as a TXT record right?: `TXT` / `s1._domainkey` / `v=DKIM1;t=s;p=` ![image](https://user-images.githubusercontent.com/1951866/104030907-012b8000-51c4-11eb-9afe-9f5eb53e9563.png) Is there something wrong here in my records?
Author
Owner

@willbrowningme commented on GitHub (Jan 8, 2021):

That's right, you do not need to add the domain AnonAddy is running on to the domains page as this is seen as the main domain. So if I was using example.com to host AnonAddy I would not add example.com to the domains page too as it will already have been setup in /etc/postfix/main.cf during installation.

You can add ANONADDY_ADMIN_USERNAME=johndoe or whatever your username is to your .env file and that will allow your main domain to act as a catch-all.

I'm not sure what your _domainkey record with a value of t=y; o=-; is?

<!-- gh-comment-id:756820357 --> @willbrowningme commented on GitHub (Jan 8, 2021): That's right, you do not need to add the domain AnonAddy is running on to the domains page as this is seen as the main domain. So if I was using `example.com` to host AnonAddy I would not add `example.com` to the domains page too as it will already have been setup in `/etc/postfix/main.cf` during installation. You can add `ANONADDY_ADMIN_USERNAME=johndoe` or whatever your username is to your `.env` file and that will allow your main domain to act as a catch-all. I'm not sure what your `_domainkey` record with a value of `t=y; o=-;` is?
Author
Owner

@crazy-max commented on GitHub (Jan 8, 2021):

That's right, you do not need to add the domain AnonAddy is running on to the domains page as this is seen as the main domain.

Ok got it thanks

I'm not sure what your _domainkey record with a value of t=y; o=-; is?

I'm currently in test mode for DKIM. I have to add support for it in our Docker image (anonaddy/docker#35).

<!-- gh-comment-id:756992269 --> @crazy-max commented on GitHub (Jan 8, 2021): > That's right, you do not need to add the domain AnonAddy is running on to the domains page as this is seen as the main domain. Ok got it thanks > I'm not sure what your _domainkey record with a value of t=y; o=-; is? I'm currently in test mode for DKIM. I have to add support for it in our Docker image (anonaddy/docker#35).
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/anonaddy#692
No description provided.