How to set up canonical tags?.
How to Correctly Implement Canonical Tags in WordPress
In this comprehensive guide, you’ll learn how to effectively implement canonical tags in WordPress. Setting up these tags correctly is crucial for preventing duplicate content issues and optimizing your SEO. By the end of this guide, you’ll be able to set up canonical tags using popular plugins like Yoast SEO and Rank Math.
Supplies
- A WordPress website
- Access to the WordPress admin dashboard
- Yoast SEO or Rank Math plugin installed.
Step 1: Log in to your WordPress dashboard.
Start by logging into your website’s WordPress dashboard. This is where you manage all the settings and plugins necessary for your website.
Step 2: Install and activate an SEO plugin
If you don’t already have an SEO plugin, it’s essential to install one. Yoast SEO and Rank Math are both excellent choices for managing canonical tags.
- Navigate to "Plugins" in the left-hand menu.
- Click "New plugin."
- Search for "Yoast SEO" or "Rank Math."
- Click "Install Now" and then "Activate."
What is a canonical URL, and what does it do?
Suppose the same page on your website can be accessed via multiple URLs. Think of yourstore.com/red-shoes, but also yourstore.com/red-shoes?color=red (via a filter) or yourstore.com/red-shoes?ref=newsletter (via a link in your email). To you, that’s one page, but Google sees it as three separate pages with the same content. This is called duplicate content: Google then doesn’t know which version to display, and your SEO value gets spread across multiple URLs instead of being concentrated on one.
What does a canonical URL do?
A canonical URL solves this problem. It’s a small piece of code that tells Google: this is the official, preferred version of this page—index this one and ignore the variations. This way, you consolidate all the value into a single URL and prevent competing against your own pages in search results.
So, what URL should you enter in the step below? Enter the clean main URL of the page, without any filters or tracking codes appended to it. In the example above, that would be https://jouwwinkel.nl/rode-schoenen. In most cases, this is simply the regular URL as you would type it or share it yourself. Tip: if you leave this field blank, your SEO plugin will automatically fill in the correct canonical URL. You should only adjust it manually if you intentionally want to link to a different page.
Here’s a concrete example: a florist has the product page https://debloemist.nl/boeketten/lentebos. Through a Facebook campaign, they share the link with a tracking code appended to it: https://debloemist.nl/boeketten/lentebos?utm_source=facebook. Both URLs display exactly the same page. By entering the canonical URL https://debloemist.nl/boeketten/lentebos, Google knows that this is the page that should rank, regardless of which link visitors use to arrive.
Step 3: Set Up Canonical Tags with Yoast SEO
With Yoast SEO, you can easily set canonical tags for each page or post. This helps you indicate to search engines which version of a page is the preferred one.
- Open the page or post where you want to add a canonical tag.
- Scroll down to the Yoast SEO meta box.
- Click the "Advanced" tab.
- Enter the URL you want to use in the "Canonical URL" field.
Step 4: Set Up Canonical Tags with Rank Math
Rank Math also provides an intuitive method for setting up canonical tags, which is essential for optimizing your SEO.
- Open the page or post where you want to add a canonical tag.
- Scroll down to the Rank Math metabox.
- Click the "Advanced" tab.
- Enter the URL you want to use in the "Canonical URL" field.
Frequently Asked Questions
Why isn't my canonical tag working?
Check that the URL has been entered correctly and contains no typos. Ensure there are no other plugins that override the canonical tags, as this can cause conflicts.
How can I check if my canonical tags are set up correctly?
View your page's source code (Ctrl+U in most browsers) and look for the 'link rel="canonical"' tag to confirm that it is set up correctly.
What should I do if I see multiple canonical tags?
This issue can occur when multiple plugins or themes attempt to add canonical tags. Identify the conflicting plugins and adjust their settings to resolve the issue.
By following these steps, you can effectively implement canonical tags in WordPress. This will help prevent duplicate content issues and optimize your SEO performance.