How to use AutoSSL without DNS and http on main domain

Operating System & Version
CloudLinux (not sure of the version)
cPanel & WHM Version
90.0

aliraaed31

Registered
Nov 12, 2020
2
0
1
Iraq
cPanel Access Level
Website Owner
Hello
I have a site hosted on a shared cPanel hosting. I want to use it only for email, and will be using another hosting for the main website (mydomain.com)
my domain DNS is managed by cloudflare and not cPanel.
and I'm pointing my main domain (mydomain.com) to another server IP, different from the shared hosting IP.

So my final setup is
email is managed by mail.mydomain.com (which has A record pointing to shared hosting IP)
website hosted on cloudways for mydomain.com (has A record pointing to cloudways server IP)

Everything working fine, SPF and DKIM set up correctly, emails are sent and delivered without problems, website loading ok.

In cpanel: I excluded all domain from AutoSSL, and only kept mail.mydomain.com.

When running AutoSSL I get error

DNS DCV: The DNS query to “_cpanel-dcv-test-record.****.com” for the DCV challenge returned no “TXT” record that matches the value “_cpanel-dcv-test-record=4mw_rYxxaOTB***********_*******”.; HTTP DCV: The system queried for a temporary file at “http://********.com/.well-known/pki-validation/B4CC03F19ACF5F54*******.txt”, but the web server responded with the following error: 404 (Not Found). A DNS (Domain Name System) or web server misconfiguration may exist. The domain “*****.com” resolved to an IP address “192.***.***.***” that does not exist on this server.



How can I keep AutoSSL running for (mail.*****.com) so I can have secure email, while keeping DNS managed by cloudflare and my main website hosted somewhere else?
Also, can I manually set the TXT record before every renewal? currently I couldn't get it done since it changes with every time AutoSSL runs.