• Resolved jasimon9

    (@jasimon9)


    We have a WordPress blog at https://www.rephunter.net/blog/. Many of the pages have a canonical link to another completely unrelated blog that I run personally, but has no connection to the blog in question.

    For example, on the page https://www.rephunter.net/blog/keep-the-ball-rolling/, the following entry appears, with the actual site name replaced with asterisks:

    <link rel=”canonical” href=”https://www.oofdah.com/blog/keep-the-ball-rolling/&#8221; />
    So the result is that the canonical entry is not pointing to our website at https://www.rephunter.net, but instead is going elsewhere.

    Please note: because of changes we made described below, this wrong link is no longer present, and the canonical link is now as it should be.

    The canonical link as far as I know is totally controlled by Yoast. However, we have never set up canonical entries at all.

    As another measure, I grepped the entire code base but could not find anything in the code.

    As a final step I looked into the Yoast tables in the database. In the indexable table, out of 600 rows, I found 17 rows that had in the permalink column references to the wrong URL. I checked the permalink for those pages, but they are not pointing to the wrong website but to the proper website.

    As a test, I manually changed a permalink anyways and rechecked that table–it still was pointing to the wrong website.

    Looking further into Yoast, I was able to run the “wp yoast index” command from the command line. The tables were re-indexed. However, the 17 entries are still pointing to the wrong website.

    As a final step, I deactivated Yoast. After that those canonical entries pointing to the wrong site were no longer present on the pages in question.

    I reactivated Yoast hoping that it might have fixed itself, but unfortunately the bad canonical links came back.

    So the problem appears to be in Yoast, and somewhere it has got information about the wrong blog.

    As an additional test, I manually updated the Yoast indexable table to change the permalink column on the 17 rows from the wrong website to the correct website. Then reactivated Yoast.

    After those steps, the canonical entry is now correct. So the immediate issue is corrected. However, I would like to know how the indexable table was corrupted, as I suspect the problem could recur.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support devnihil

    (@devnihil)

    @jasimon9 We’re sorry to hear you are experiencing this issue on your site.

    Was the site ever previously on a staging or development site?

    Typically an issue like this is caused when values of URLs from a previous location are retained. To resolve this, we’d recommend trying the following:

      1. Install & activate the?Yoast Test Helper plugin
      2. Go to Tools -> Yoast Test
      3. Hit the “Reset Indexables & Migrations” button
      4. Under SEO → Tools, click the “Start SEO Data Optimization” button.

    `

    Thread Starter jasimon9

    (@jasimon9)

    This problem has regressed, with many canonical links pointing to a foreign blog.

    The last time I fixed manually via SQL commands to correct the entries in the yoast indexable table. I did not run the steps that you suggest above because your post came in two days after I already resolved it via brute force. This time I did try the steps that you present.

    it appears to have worked to correct the canonical links. I am still concerned that the underlying cause of the issue may not be corrected, and the the issue could recur.

    Any advice?

    Thread Starter jasimon9

    (@jasimon9)

    I noticed that the problem has recurred again. Again the steps suggested fixed the problem.

    What causes it to keep recurring?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress pages have canonical entry to another website’ is closed to new replies.