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 install
to install dependencies -
Use
ssh -R 80:localhost:8080 localhost.run
to 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.html
file's header -
In a new command shell, run
npm start
to start the server atlocalhost:8080
-
Complete property verification
-
Try to submit the sitemap
/sitemap.xml
to Google. It should fail withCouldn't fetch sitemap
-
Comment out the
X-Robots-Tag
header inapp.js
and try to resubmit. It should succeed.