Minimum working example for issue described in https://support.google.com/webmasters/thread/171071268?hl=en
-
Requires installation of Node.js
-
Put these files into a directory, run
npm installto install dependencies -
Use
ssh -R 80:localhost:8080 localhost.runto setup a temporary tunnel to your local machine, leave that shell open -
Copy & paste the publicly accessible tunnel url that will be established, e.g.
https://XXX.lhrtunnel.link -
Open Google Search Console and create a new URL prefix property with that tunnel link
-
Use the meta tag verification method and paste it into the project's
index.htmlfile's header -
In a new command shell, run
npm startto start the server atlocalhost:8080 -
Complete property verification
-
Try to submit the sitemap
/sitemap.xmlto Google. It should fail withCouldn't fetch sitemap -
Comment out the
X-Robots-Tagheader inapp.jsand try to resubmit. It should succeed.