I've noticed this with many WordPress projects (and clients) over the years so I thought it was worth a public thread. When you interlink a post/page that has embedding enabled, the iframe source will affix /embed/ URL suffix:

<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" title="Example" src="https://example.com/blog/post/embed#?secret=12345#?secret=12345" data-secret="12345" width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>

However this tends to make Google GSC go a bit crazy because their bots will try to crawl the iframes. WordPress does already include the noindex meta tag on those generated sub-pages:

<meta name='robots' content='noindex, follow, max-image-preview:large' />

WordPress also includes a canonical tag:

<link rel="canonical" href="https://example.com/blog/post" />

However, for search engines like Google they still assume you want the content crawled because of the iframe existing on a public page... resulting in tons of crawl errors in GSC. But because the rel flag is not supported on iframes, there doesn't seem to be any easy way to avoid this conflict?

TLDR this seems to be more of a Google problem than a WordPress problem, but I find it strange that the /embed/ page has the exact same content as the canonical version... so what is the purpose of having both?

  • 1
    Well look at the embed version, it looks completely different so that it works as an embed. That's the purpose. Jan 30 at 8:54
  • @JacobPeattie That's what I have assumed in the past, but the embed version looks exactly the same on the sites I tested, so I figured if the API renders the iframe styling anyways then why even have multiple URLs? Jan 30 at 9:59
  • 1
    It shouldn't look the same. It should look like this: make.wordpress.org/core/2023/01/20/… Jan 30 at 11:08
  • Interesting... it looks like that on some sites/pages, but not others I checked. And yet either way, the iframe still looks perfect in both cases, adding to my confusion of why a separate URL is needed if the iframe looks fine either way heh. Jan 30 at 15:12


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.