domain in canonical, og:url and schema data
-
In a site where one domain is public, and a separate domain is used for wp-admin access, canonical values will display the wrong domain after recent updates.
Imagine a site that is available on example.com, but admin access is handled via admin.example.com. When the admin domain is accessed, WP_SITEURL and WP_HOME is set in wp-config.php to allow the domain to be browsed on that domain.
On a couple of scenarios like this I have seen that the canonical metadata, on requests to example.com would display admin.example.com. And the same with og:url and yoast-schema-graph.
I found out that this happens because it is indexed in wp_yoast_indexable with the admin.example permalink – even though the canonical fields are empty. It seems to me that it should respect the current wp home url these cases. Currently it seems like I have to run wp search-replace or wp yoast index –reindex to solve the issue.
- The topic ‘domain in canonical, og:url and schema data’ is closed to new replies.