@mohsinsheikhms Can you please provide us with an example link for the site so that we can check whether the canonical tag is being output correctly by the plugin?
By default the Yoast SEO plugin will output a canonical tag for every page/post on your site, and will use the permalink of that page/post for the canonical URL value. Normally, you would leave the Canonical URL value in the plugin blank by default and the canonical tag will automatically be set to the same value as the page’s permalink.
If you do wish to change the Canonical URL for a page, you would need to perform the following steps:
? Go to the edit screen for a page/post
? Scroll down to the Yoast SEO box and click on the ‘Advanced’ area.
? Set a value set for the ‘Canonical URL’
? Click ‘Update’
As for the www/non-www setting, whether a site uses www/non-www is not controlled in the Yoast SEO plugin. This is controlled in WordPress by the WordPress Address (URL) and Site Address (URL) values which are located in Settings>General. You would need to make sure that both of these are set to use www.
If you are not seeing the site automatically use www in the URL after confirming these settings, we would recommend checking with your host for more information on how to force all requests to the site to use www, as this can sometimes vary depending on the server configuration and hosting provider.