pygeoapi icon indicating copy to clipboard operation
pygeoapi copied to clipboard

return html if no accept encoding is requested

Open pvgenuchten opened this issue 3 years ago • 3 comments

Somehow i missed the aspect that google these days does not fetch any structured content from demo.pygeoapi.io since mid 2020, it seems related to the fact that google crawler does not send an accept header when fetching content in combination with pygeoapi returning json, if no accept header is send.

The yandex structured data validator has the same 'challenge'.

Suggestion would be to return html when no accept-header or ?f={encoding} is provided.

pvgenuchten avatar May 15 '22 10:05 pvgenuchten

I agree. I thought the mimetype config option is supposed to set this

ksonda avatar May 17 '22 03:05 ksonda

a potential workaround if people are not enthousiastic on this:

  • add a sitemap.xml which references each of the enpoints with explicit ?f=html (or better xxx.html)
  • the html would indicate xxx.html as canonical url

pvgenuchten avatar May 20 '22 12:05 pvgenuchten

As per RFC4, this Issue has been inactive for 90 days. In order to manage maintenance burden, it will be automatically closed in 7 days.

github-actions[bot] avatar Mar 10 '24 21:03 github-actions[bot]

As per RFC4, this Issue has been closed due to there being no activity for more than 90 days.

github-actions[bot] avatar Mar 31 '24 03:03 github-actions[bot]