Let’s talk a little about canonical URL in WordPress. What it is for? What is its importance to SEO and how we can edit it through the Yoast SEO Plugin? The answers are here.
What is a canonical URL in WordPress?
The canonical URL is one of the most important ways to prevent the existence of duplicate content on your site, blog or e-commerce store, this feature can also be used to improve the rating of links and the content available. It is very common that one content is accessed from multiple URLs, as the content is distributed to URLs and domains are completely different.
The most sought usefulness to the canonical URL is to prevent little robots or spiders of search engines from getting confused with the content, classifying it as a duplicate.
The Yoast SEO and control of the Canonical URL
As one of the SEO tools that is more known and used to help organize more indexable content organically by search engines, the Yoast SEO offers two ways to take care of canonical URLs. Normally Yoast already adds canonical URLs for most of the pages on your website or WordPress blog. In this case we will show how to do it manually:
Individually (article by article)
The canonical URL in WordPress can be created or changed directly from the content creation page, just go to the “Advanced” tab in METABOX the Yoast, to change the canonical URL:
Canonical URLs to files pages
A very common mistake for those who have their content distributed in various blog pages, is to point out the canonical URL of the WP only page 1, at the risk of the search engines not to index links that are or appear on other pages. This action causes the older articles start to fall or disappear from the search results entirely.
To avoid this catastrophe loss of content, you need to change the canonical element of categories, tags or other taxonomy element that you use to point to another page.
It’s not a challenging task, just go to the taxonomies settings and set the canonical:
Filter the Canonical URL Programmatically
There is another possibility. You can also filter the output of the canonical URL of WordPress programmatically. Just use the wpseo_canonical filter and return “false” for the canonical URLs that you do not want to send.
I hope you enjoyed the article and that it can help you.