Yoast SEO works in a way to choose a focus keyword for your articles, and then makes sure that you use that focus keyword everywhere. But Yoast SEO turns the canonical URLs ON always.
It has different types of features:
– Page Analysis
– Search Engine Optimization
– XML Sitemaps
– Meta & Link Elements
– RSS Optimization
– Social Integration
– Multi-Site Compatible
– Import & Export functionality
Unfortunately WordPress SEO or Yoast SEO turns the canonical URLs ON and unlike other SEO plugins does not have an ON/OFF option.
You need to add filter in function.php using below code:
Turn off Canonical URLs:
add_filter( ‘wpseo_canonical’, ‘__return_false’ );