Uncertain about DNS setup for cloudflared tunnel

I am setting up Cloudflare tunnel for my website. I have installed cloudflared and I can visit the website with www.<name>.com, but I want to redirect the root domain to www.<name>.com

On the DNS page shows two recommended steps:

Add an A, AAAA, or CNAME record for www so that www.name.com will resolve
Add an A, AAAA, or CNAME record for your root domain so that name.com will resolve.

I added the following records, as there is an information icon on the first rule shows the rule is using CNAME flattering.

  1. CNAME name.comxxxxxxxx.cfargotunnel.com Proxied

  2. CNAME www xxxxxxxx.cfargotunnel.com Proxied

Then in the Rules->Overview, add a redirection for root '@' to www.name.com

It seems working fine, I type name.com it will go to www.name.com. Please advise the setup is correct or not. Thanks!