I only would like to know if we add *.domain.in in External dynamic list and if we call that EDL in Antispyware profile with action Alert, then EDL will take preference with alert action and exclude it or DNS security will take preference with sinkhole action.
No, you need to whitelist the domain in the DNS Security local cache.
If you ran PAN-OS 10.0 you can configure domain exceptions in the Anti-Spyware profile, but for 9.0 and 9.1 the exception is global and you need to configure it from the CLI.
I added instructions in this post https://live.paloaltonetworks.com/t5/general-topics/disney-domain-being-sinkholed-as-dns-tunneling-d...
It would be best to investigate why your internal domain is considered malicious though. It could be an FP and could be whitelisted in the cloud.
You can try to see if the domain is listed as a malicious URL Category in https://urlfiltering.paloaltonetworks.com/query/ and if it is, request a category change to an otherwise benign category. That will propagate a signal from PAN-DB to DNS Security to also whitelist the domain.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!