How to generate sitemap on a highly dynamic website?

前端 未结 6 568
一个人的身影
一个人的身影 2020-12-07 12:36

Should a highly dynamic website that is constantly generating new pages use a sitemap? If so, how does a site like stackoverflow.com go about regenerating a sitemap? It seem

6条回答
  •  情深已故
    2020-12-07 13:20

    There's no need to regenerate the Google sitemap XML each time a question is posted. It's far simpler just to have the XML file generated on-demand directly from the database (and a little caching).

    To reduce load, the sitemap can be split into many sitemaps. Partitioning it by day/month would allow you to tell Google to retrieve today's sitemap frequently, but only fetch the sitemap from six months ago once in a while.

提交回复
热议问题