How to implement "www resolve" for a website hosted on IPFS?

Newbie here (to both IPFS and web development). I’ve a website hosted on IPFS. I tried adding an A record for www pointing to the IP address of the gateway. But it’s not working and resulted in the error: ipfs resolve -r /ipns/ could not resolve name

How can I solve this? Any help will be appreciated.

Follow the instructions here: You need a TXT _dnslink record.

Thanks for the reply @hector.
I’ve already added a TXT record with _dnslink. But it’s only resolving and not I’m using Cloudflare. What am I missing? Here are my records as of now:

you need a dns link with name and another as

Appreciate your help. I tried adding that TXT record and still it’s not working for me.

Visiting is now giving me DNS_PROBE_POSSIBLE error on Brave browser.