ashhitch/wp-graphql-yoast-seo

Canonical Returns Nothing

jhochgrevetsd opened this issue · 4 comments

I have added canonical tags to Yoast and have added the canonical call to my Graph, but it still returns an empty string no matter what I do. Here is my SEO call:

seo { opengraphImage { sourceUrl } title metaDesc canonical schema { raw } }

I just saw that these will not be returned unless we have our WordPress instance set to allow search engines. Might I suggest somehow allowing this? We utilize this plugin for headless WordPress websites and had an issue with search engines indexing the WordPress instance (on a different domain).

Same problem for me, need it for headless Wordpress too :(

Yeah, as mentioned before, this is standard in Yoast and is passed back from their methods.

I also use this in a headless environment; some users will want to use all these settings as they are now.

What I normally do is have my own robots.txt or index.php which the setting to make sure the admin is not indexed

I had misunderstood your response but that makes sense : il a content should not be indexed, you don't need canonical url ! Thanks for helping.