Title: Problems with headless WordPress
Last modified: March 17, 2020

---

# Problems with headless WordPress

 *  Resolved [dennishh](https://wordpress.org/support/users/dennishh/)
 * (@dennishh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/)
 * I’m trying to set up Site Kit in a headless WordPress environment.
 * **Setup**
    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.
 * **Problem**
    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 [https://cms.example.com](https://cms.example.com)
   vs. [https://example.com](https://example.com)). 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 example.com, but should go to cms.example.com). 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: “[https://example.com&#8221](https://example.com&#8221);),
   but the response (status code 500) contains a completely different URL (“url”:”
   [http://www.example.com&#8221](http://www.example.com&#8221); – 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)

 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12553902)
 * [@dennishh](https://wordpress.org/support/users/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](https://sitekit.withgoogle.com/documentation/using-site-kit-on-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!
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12584844)
 * [@dennishh](https://wordpress.org/support/users/dennishh/) I’m following up on
   your support topic. Could you provide the information requested above? Happy 
   to look into this further for you.
 *  Thread Starter [dennishh](https://wordpress.org/support/users/dennishh/)
 * (@dennishh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12585288)
 * Hello [@reneesoffice](https://wordpress.org/support/users/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!
 *  Thread Starter [dennishh](https://wordpress.org/support/users/dennishh/)
 * (@dennishh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12585323)
 * [@reneesoffice](https://wordpress.org/support/users/reneesoffice/)
    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.
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12593646)
 * [@dennishh](https://wordpress.org/support/users/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!
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12614553)
 * [@dennishh](https://wordpress.org/support/users/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](https://i.imgur.com/Rtkmsba.png)?
   You can alternatively provide it [in this form](https://forms.gle/NsbUGBoU5nohUt5o6).
 * 2) You mentioned that you were attempting to get data from one site to another:
   data for _[https://example.com](https://example.com)_ to _[https://cms.example.com/](https://cms.example.com/)_
 * Just to confirm: is _[https://example.com](https://example.com)_ 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.
 *  Thread Starter [dennishh](https://wordpress.org/support/users/dennishh/)
 * (@dennishh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12615900)
 * [@reneesoffice](https://wordpress.org/support/users/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) [https://example.com](https://example.com) 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.
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12625250)
 * [@dennishh](https://wordpress.org/support/users/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](https://forms.gle/vzu4AudzVV7xeQps6)
   if you prefer not to share this info in the thread.
 * I’ve opened [a Github issue](https://github.com/google/site-kit-wp/issues/1347)
   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.
 *  Thread Starter [dennishh](https://wordpress.org/support/users/dennishh/)
 * (@dennishh)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12633443)
 * [@reneesoffice](https://wordpress.org/support/users/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.
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12635222)
 * [@dennishh](https://wordpress.org/support/users/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](https://forms.gle/vzu4AudzVV7xeQps6)
   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.
 *  [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * (@reneesoffice)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12710920)
 * [@dennishh](https://wordpress.org/support/users/dennishh/) I’m following up on
   your topic. I’m not sure if you’ve been following the [Github issue](https://github.com/google/site-kit-wp/issues/1347),
   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)

The topic ‘Problems with headless WordPress’ is closed to new replies.

 * ![](https://ps.w.org/google-site-kit/assets/icon-256x256.png?rev=3141863)
 * [Site Kit by Google - Analytics, Search Console, AdSense, Speed](https://wordpress.org/plugins/google-site-kit/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-site-kit/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-site-kit/)
 * [Active Topics](https://wordpress.org/support/plugin/google-site-kit/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-site-kit/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-site-kit/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Renee Johnson](https://wordpress.org/support/users/reneesoffice/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/problems-with-headless-wordpress/#post-12710920)
 * Status: resolved