Support » Plugin: Site Kit by Google » Problems with headless WordPress

  • Resolved dennishh


    I’m trying to set up Site Kit in a headless WordPress environment.

    The WordPress we use sits behind a firewall and is not used to render the website. There’s a completely separate application that takes care of that. Think of it as a kind of static site generator.

    As I figured that this won’t work without the Dev Settings Plugin, I installed it and successfully retreived oAuth credentials. I entered those, alongside the actual URL of the website I’d like to get data for (think of vs.
    Although it was a bit of a hassle, I was able to successfully authenticate myself in the Site Kit dashboard (the oauth callback goes to, but should go to
    Now, when trying to verify the URL, I constantly get the error “The necessary verification token could not be found on your site.”. What’s interesting is that the xhr Site Kit sends uses the correct URL (siteURL: “”), but the response (status code 500) contains a completely different URL (“url”:”” – protocol and subdomain are wrong).

    Please help us resolve this issue so that we can use Site Kit.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Renee Johnson


    @dennishh Thanks for your topic and providing these details. I may need to confer with our team about your case. For further context could you tell me the following:

    1) You mention the Dev Settings Plugin, are you referring to the plugin provided for using Site Kit in a staging environment found in our documentation?

    2) Did you attempt setting up Site Kit without the dev plugin (straight from downloading and installing the plugin from the repository)? If so, what was the outcome?

    2) Who is your host or feel free to tell us more about the application you’re using to render the website.

    Thank you!

    Plugin Support Renee Johnson


    @dennishh I’m following up on your support topic. Could you provide the information requested above? Happy to look into this further for you.

    Hello @reneesoffice! Thanks for your reply and sorry for my late response. As you can imagine, things are a bit chaotic right now. I’ll get back to you with the necessary information asap!

    1) yes, that’s the one I installed and configured
    2) yes, I tried that. It fails at the “Verify site ownership” step with this message: “The necessary verification token could not be found on your site. This may be related to your site using a page caching plugin. Please flush your home page cache and then try again.”. That’s expected, since Site Kit has no control over the actual website, since WordPress is not used to render it.
    3) WordPress is hosted in AWS, as is the website we would like to connect Site Kit to.

    What I suspect is that Site Kit tries to find the necessary data on the website, which it can’t because it has no control over it.

    Is there another way to authorize the plugin? Google Search Console was authorized via DNS verification, but we could also upload a verification file to the website itself if that’s necessary.

    Plugin Support Renee Johnson


    @dennishh totally understand and thanks for the details. I’m going to confer with our team about your current setup and possible options. I’m not sure this dev plugin would serve your use case. We’ll provide an update with more information as we know more. Take much care!

    Plugin Support Renee Johnson


    @dennishh we’d like to investigate this further for you and other users that may have similar setups. Some additional questions below:

    1) Could you share your Site Health information? You can alternatively provide it in this form.

    2) You mentioned that you were attempting to get data from one site to another: data for to

    Just to confirm: is a completely separate site or is it part of the headless setup?

    Along with the initial set up of the plugin, we may also need to explore how the service connections would work in this environment, so any further information about your setup would be welcome.

    @reneesoffice thanks for your reply!

    1) There’s plenty of homegrown plugins listed in that information dump, alongside email addresses. Could you tell me which information exactly you need from that dump, so that I can pick the necessary parts from it?

    2) is a completely separate site fully under our control. We have a custom WordPress plugin that exports article data (not the wp json API) to a separate system written by us running in the cloud which takes this data and builds websites with it.

    I do not know how your plugin tries to check for the verification token; I suspect it looks for a (temporary?) element in the website’s html to verify. If we were able to manually add this element to our website, or if a validation via DNS was possible, it would probably solve the issue.

    Plugin Support Renee Johnson


    @dennishh thanks for the details!

    In terms of Site Health, at the moment, feel free to provide what you can and redact personal data and what you would prefer to not share. If there is something essential we can follow up. You can also use the form if you prefer not to share this info in the thread.

    I’ve opened a Github issue for our investigation that you can follow and contribute to if you like. We’ll keep this thread updated on the progress or for further questions.

    @reneesoffice thanks for opening an issue on github. Would a quick Hangout be possible? That way, I could lead you through our setup and clarify open points.

    Plugin Support Renee Johnson


    @dennishh thanks for the reply. We currently don’t provide support via Hangouts, but I’ll inquire with the team about what’s possible. If you’d like to share a screencast overview of the setup and what you experience with Site Kit that would be super helpful I think. The form I mentioned has an open area at the end for other supporting information. A link to a video and/or further information there would be great.

    Plugin Support Renee Johnson


    @dennishh I’m following up on your topic. I’m not sure if you’ve been following the Github issue, but our developers recently added some input on Site Kit’s compatibility with headless WordPress. Currently, there isn’t support for this setup, but there are a few tips on some workarounds that may help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.