• Resolved Layman Lab

    (@laymanlab)


    Hello-

    I’ve been using Yoast SEO for years on a client site, and recently I’m digging more into her backend issues to improve her rankings. I noticed that many of her site pages have canonical errors (The canonical URL is a dead URL), and that will likely prevent these pages from being indexed correctly. The canonical URL on these pages is set to an old staging site URL (for example, for the “www.LIVE-WEBSITE/about-me” page, the canonical URL is “www.NO-LONGER-ACTIVE-STAGING-SITE/about-me”. Perhaps this was done automatically by the plugin when it noticed that the staging site had the same content as the live site. This is odd if so.

    When I go into the Yoast settings on one of the affected pages, and look in the “advanced” section, there is no entry in the “canonical URL” field, but I can confirm the presence of a canonical URL via the source code. If I type in a space to that “canonical URL” field and click “update”, the bad canonical is now gone (problem solved!). The issue is that I have 250 pages to go.

    My questions:

    1) Why did that happen (automatically adding canonical URLs for the staging site), and how do I prevent it from happening when I use my staging site to make edits next time?

    2) How can I fix this issue in bulk? I have seen solutions that hide all canonical URLs, but I do not want to cut out the ability to have canonical URLs in general – I just want to refresh or repair these existing issues.

    Thanks in advance for the help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Maybellyne

    (@maybellyne)

    Hello @laymanlab,

    Thanks for reaching out about your canonical URL issue. I’ve addressed your concerns below:

    1) Why did that happen (automatically adding canonical URLs for the staging site), and how do I prevent it from happening when I use my staging site to make edits next time?

    By default, the Yoast SEO plugin uses self-referenicng canonical URLs. This means the page URL is used as the canonical; you don’t habe to fill in the canonical URL field. However, the staging site URL may have been used if you moved from that staging site to production and invalid/incomplete data wasn’t cleared

    2) How can I fix this issue in bulk? I have seen solutions that hide all canonical URLs, but I do not want to cut out the ability to have canonical URLs in general – I just want to refresh or repair these existing issues.

    Hiding the canonical URLs is not a pretty good solution. We have seen unexpected issues where the previously optimized data is invalid or incomplete. We’ll start with resetting the optimization to ensure we remove invalid data. Please follow these steps:

    1. Install & activate the Yoast Test Helper plugin
    2. Go to Tools > Yoast Test
    3. Locate the Yoast SEO section and click on the ‘Reset indexables tables & migrations‘, ‘Reset Prominent words calculation‘, and ‘Reset Internal link counter‘ buttons. After each click, the page will reload to confirm that the specific reset was successful.
    4. Go to SEO > Tools, and under SEO data, click the “Start SEO data optimization” button to allow Yoast to rescan your content.

    Please let us know if the reported issue remains after resetting the optimized data.

    Thread Starter Layman Lab

    (@laymanlab)

    This worked. Thank you!

    • This reply was modified 9 months, 3 weeks ago by Layman Lab.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Canonical issue RE: Staging URL’ is closed to new replies.