DoH server connection error

Hi, after setup DoH:
/tool fetch url=https://cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem
/certificate import file-name=DigiCertGlobalRootCA.crt.pem passphrase=””
/ip dns set use-doh-server=https://cloudflare-dns.com/dns-query verify-doh-cert=yes
/ip dns static add address=1.1.1.1 name=cloudflare-dns.com
/ip dns set servers=””
/ip firewall nat add action=redirect chain=dstnat comment=”redirect dns-query to local DNS” dst-port=53 in-interface-list=!WAN protocol=udp

I run terminal command /log print
and has such answer “dns,error DoH server connection error: SSL: ssl: hostname validation failed (6)”
What’s wrong?

Hello try this

/ip dns
set allow-remote-requests=yes use-doh-server=\
    https://cloudflare-dns.com/dns-query verify-doh-cert=yes
/ip dns static 
add address=104.16.248.249 name=cloudflare-dns.com
add address=104.16.249.249 name=cloudflare-dns.com
/ip firewall nat 
add action=redirect chain=dstnat dst-port=53 protocol=tcp
add action=redirect chain=dstnat dst-port=53 protocol=udp

or depend on Your local subnet 192.168.88.0/24 as default

/ip firewall nat add action=redirect chain=dstnat dst-port=53 protocol=tcp src-address=192.168.88.0/24
/ip firewall nat add action=redirect chain=dstnat dst-port=53 protocol=udp src-address=192.168.88.0/24

For certificate it takes time

/tool fetch url=https://curl.se/ca/cacert.pem

/certificate import file-name=cacert.pem passphrase=""