对于任何CMS系统创建sitemap.xml最有效的方法是什么? [英] What is the most performance effective way to create a sitemap.xml for any CMS system?

查看:205
本文介绍了对于任何CMS系统创建sitemap.xml最有效的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想要在out CMS系统中实施sitemap.xml功能。在我们的开发人员中有一些论点,这个功能会影响性能,因为每次在内容中进行更改时,需要创建并放置在sitemap.xml中的网站的完整链接列表。

We want to implement a sitemap.xml feature in out CMS system. There is some argument within our developers that this feature will impact performance due to each time a change is done in the Content a full list of links of the site needs to be created and placed in the sitemap.xml.

这个想法是,每次编辑或添加公开的查看页面时,都会立即添加到sitemap.xml中,使其与网站保持一致。

The idea is that each time a public viewing page is edited or added it is immediately added to the sitemap.xml making it up to date with the site.

在回答时,如果您有时间,还有什么其他CMS系统打开或没有内置的Sitemap生成?

While you are answering, and if you have time, what other CMS system open or not have built-in sitemap generation?

感谢,

推荐答案

每次更新CMS时更新Sitemap都会造成性能问题,因为Sitemap ,并且生成代价很高(从CPU和磁盘i / o透视图)。

Updating the sitemap every time you update your CMS will definitely create performance issues, because sitemaps tend to be large, and costly to generate (from a CPU & disk i/o perspective).

我会做的是:

1. map out您的网站结构

2.确定您需要在站点地图中链接到哪些区域

3.将robots.txt文件中的网站地图索引的名称添加到您的robots.txt文件中

4.编写一个将从数据库读取并生成静态xml站点地图文件的脚本

5.创建将定期重新运行此脚本的cron作业

6.将您的站点地图网址提交给搜索引擎

What I would do is:
1. map out the structure of your site
2. determine which areas you need to link to in the sitemap
3. add the name of the sitemap index to your robots.txt file
4. write a script that will read from the database and generate static xml sitemap files
5. create a cron job that will re-run this script on a regular basis
6. submit your sitemap url to the search engines

这篇关于对于任何CMS系统创建sitemap.xml最有效的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆