Redirect www to naked domain using CloudFlare

I would like all my requests to www.example.com to be redirect to example.com, in order to ease anaylitics and for marketing reasons. I could not find out how to this this with CloudFlare (I was used to doing that in Namecheap's Redirect records)


I guess I just solved the problem. I added a CNAME for the www subdomain plus a PageRule to forward requests made to it.


This is the redirection page rule that worked for me.

*www.qforex.ml/* --> https://qforex.ml/$2

The number after $ will represent the nth occurrence of *.

The image below shows the details.

Cloudflare URL Forwarding