You can try using the page rules which comes built-in in cloudflare itself. Instead of using www as a cname use it as a A entry and use CF page rules to redirect all your traffic to www instead of without www. Remember to use the permanent redirect. Moreover if it's wordpress then install cloudflare wordpress plugin which automatically gives 404 errors on the page which does exits. I hope it may help you if you didn't got what i said then feel free to PM me, i'll help you to get it sorted.
You've to add both non www and www versions of your site in google webmaster and have to chose the www one (the current domain) as preferred domain. Keep both versions of site in webmaster tools.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.