Wordpress-seo: rel="canonical" is gone

Created on 8 Mar 2018  路  7Comments  路  Source: Yoast/wordpress-seo

  • [ ] I've read and understood the contribution guidelines.
  • [ ] I've searched for any related issues and avoided creating a duplicate issue.

Please give us a description of what happened.

No canonical tag is set in all pages.

Please describe what you expected to happen and why.

All pages have no canonical URLs, unlike what is described here.

https://kb.yoast.com/kb/canonical-urls-in-wordpress-seo/

Also the rel=prev" and "next" are gone unlike what is described in onother post
.
https://yoast.com/rel-next-prev-paginated-archives/

both are gone since version 7.0

How can we reproduce this behavior?

  1. will return in the next update
    2.
    3.

Technical info

  • WordPress version: 4.9.4
  • Yoast SEO version: 7.0.2
  • Relevant plugins in case of a bug:
  • Tested with theme:

Most helpful comment

@pySilver
I've found the cause of the issue.
Yoast removes the Canonical tag if the site is set to be hidden from robots.

Our development sites are set to be hidden from robots, but we still check against Canonical tags before we go live as part of pre-launch SEO, this causes a bit of a problem for us but at least we know why it's doing it now.

https://github.com/Yoast/wordpress-seo/pull/9223.

All 7 comments

Sorry.
the canonical tag is here.

just the rel=prev" and "next" are gone on pagination

nope, canonical is gone.

Thanks for reporting this issue. Unfortunately, I'm not able to reproduce this problem. I've tried with the newest version of Yoast SEO 7.1, WordPress 4.9.4 and a default theme like Twenty Seventeen. Both canonical as wel as the rel=prev" and "next" are visible in the source code. Therefore, I'm closing this. Please follow these guidelines to improve your bug report.

If you are looking to receive free support for Yoast SEO we have the following channels:

Or if you want personal support via email, you can purchase Yoast SEO Premium.

Thank you for your understanding.

We have just noticed the same issue.
WordPress version v4.9.4 using PHP 7.2.1 and cannot see the Canonical tag.

We have deactivated the theme, returned it to a WordPress default theme (twenty seventeen) and the issue remains.

The Yoast code is being injected in to the head, but the canonical tag is not there.

@bravecreative @benvaassen in our case the guilty one was "is multiple taxonomy query" check which in my opinion needs a filter to be easily overridden. There are cases when page looks has "multiple taxonomy queried" (think complex e-commerce) but this page is perfectly unique to be indexed.

@pySilver
I've found the cause of the issue.
Yoast removes the Canonical tag if the site is set to be hidden from robots.

Our development sites are set to be hidden from robots, but we still check against Canonical tags before we go live as part of pre-launch SEO, this causes a bit of a problem for us but at least we know why it's doing it now.

https://github.com/Yoast/wordpress-seo/pull/9223.

@bravecreative this tripped me up for days - glad I came across your thread reply! Thanks!

Was this page helpful?
0 / 5 - 0 ratings