How To Remove Duplicate Canonical Url In WordPress

How To Remove Duplicate Canonical Url In WordPress

Guide On How To Remove Duplicate Canonical Url In WordPress

Canonical Url tag is one of the most important thing in website SEO as it helps remove duplicate content which is created automatically by WordPress.
If your website posses single page that is accessible from different urls , Google will see it as duplicate and will choose one of them as a Canonical, craw and index it. Don’t let Google choose for you. You have to make your choice, if you don’t then google will do that and this may results in low website rankings. Sometimes your post will not rank at all due to the already formed duplicate content.

Any WordPress user , no matter how technically good you are, you may have had an encounter with canonical issue before since in the new version of WordPress, canonical Url function is added automatically.

Read Also : How To Add H1 Tag In WordPress Homepage

There are so many SEO plugins that can help solve this issue by just disabling the auto generated canonical Url link by WordPress.

Duplicate Canonical Url which can cause duplicate content can also downgrade your website rankings on Google and even other search engines too. In this article, I will be showing you how to remove duplicate Canonical Url In WordPress.

Importance Of Having Canonical Url.

1. Canonical Url clarifies the kind of url you want Google to display on search results.

when canonical Url is properly configured, search engines will now know the exact page url you want to display in search results.

2. It prevents duplicate content of a single page.

Adding canonical Url will prevent duplicate content especially when new post or page is added. This allow googlebot or any other crawler to crawl your newly added pages instead of crawling the duplicate version of that same pages.

3. It makes indexing more easier as it prevents googlebot from thinking for your website because you have already given it a direction to go.

How To Remove Duplicate Canonical Url In WordPress.

Step 1

Login to your WordPress dashboard

Step 2

Navigate and locate ” Appearance” and click on it.

Step 3

Select edit theme and locate Function PHP.

Step 4

Copy the below code and paste it beneath the function PHP code

/**
 * Allow changing of the canonical URL.
 *
 * @param string $canonical The canonical URL.
 */
add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
        if(is_front_page() ){ 
            return false;
        }
		
	return $canonical;
});

Step 5

Click on save or update and check your website using this tool to see whether the canonical issue still exist.

Conclusion

I believe your long searching on how to remove duplicate canonical Url in WordPress has finally come to an end by the help of this tutorial. You may drop your comments and also ask any questions if you have. Please don’t spam the comments session with links | All comments with links will not be approved | Thanks for being with us

2 thoughts on “How To Remove Duplicate Canonical Url In WordPress

Leave a Reply

mersin escort kızkalesi
%d bloggers like this: