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?