How to Remove Canonical URL in WordPress?

WordPress, along with SEO, is a great tool to help you build a website. However, it’s not an easy tool to understand for those who are new to it. One of the confusing parts of WordPress is the concept of a canonical URL, which can be difficult to understand at first.

In a nutshell, a canonical URL is a URL that is always considered the best one to use when referring to a piece of content on your blog. This is useful if you have multiple versions of the same post on your blog.

If you always produce unique page and post content, then you don’t need this default canonical feature.

Let’s remove the canonical URL from your WordPress site. Check the following code. Copy the code and paste it inside your function.php file. It will remove your canonical URL from the header source. 

					/** Remove Canonical URL **/
remove_action('embed_head', 'rel_canonical');
add_filter('wpseo_canonical', '__return_false');

Without coding, you can remove the canonical URLs too. Just install WP Adminify plugin and navigate to WP Adminify > Tweaks > Head area. Search for Remove Canonical URL option.

Enable this option, save your plugin settings. Then reload your webpage and check for the canonical URL in its page source. 

remove canonical URL from head area
August 28, 2021
Head Tips and Tutorials
Was this article helpful?