Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] Disable Canonical URL's

Viewing 7 replies - 1 through 7 (of 7 total)
  • I would also like to be able to disable the canonical URL… the Yoast SEO plugin is creating a canonical non-friendl URL for a WP Custom Content Type and is screwing up the indexing for the search engines. Any ideas??

    I temporarily fixed my problem by commenting out line 10 in class-frontend.php:

    remove_action( 'wp_head', 'rel_canonical' );

    But it will not fix once I upgrade the plugin. It would be nice to have some options as to when to use the canonical URL or disable it altogether.

    Yeah I modified the plugin by passing false as the value for the echo param where it is calling the canonical function.. either way, it’s a hack and as you said will be over-written once upgraded. Thanks for your response, hopefully Yoast will add some options.

    Thanx for your hints … it works nice, but of course only to the next update. I need this option to deactivate canonical urls too.

    I’m also interested – I print canonical URLs manually (cleaner source/no self-closing slash because I’m HTML5-crazy like that). The ability to stop that output would be great.


    It would be great to hide them, but I’ve found I can work around most problems with dynamic urls from custom post types/taxonomies by setting explicit canonical URLs for them.

    It wasn’t immediately obvious how to do this (at least to me). Go to Yoast SEO > General Settings, untick the checkboxes against the problem post types and taxonomies. Then you can go to the custom taxonomy screens and edit the individual terms, you can put in a custom canonical URL there.

    This doesn’t help when you hit the root url of a custom post type, I can’t find a setting for that one, but any path through a category/tag/custom taxonomy to pages with using a custom content type can be manually overridden this way.



Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Disable Canonical URL's’ is closed to new replies.