How can ı solve my seo problem

<link rel="canonical" href="" />
ı added this to my <head>

but ı get this error in in seo test.

Warning, no 301 redirects are in place to redirect traffic to your preferred domain. Pages that load successfully both with and without www. are treated as duplicate content!

Not all versions of your page point to the same URL.

Hi there :wave:. This error isn’t related to the canonical meta tag, but with redirecting your www subdomain to your main naked domain. If you’re using CloudFlare you can follow the steps here to redirect your www subdomain: