织梦生成xml网站地图

An example of a traditional site map at Apple.com
Introduced in the earliest days of the web, site maps were traditionally an overview, often in list format, of pages in a website, with links to each page. HTML site maps are still around – Apple’s site map is a good example – and are still useful to visitors for a website with more than a dozen or so pages. (If your site has nine or fewer pages, every page should be linked to every other, precluding the need for a site map).

网站地图最早是在网络成立之初引入的,通常是网站页面的概述,通常以列表格式显示,并带有指向每个页面的链接。 HTML站点地图仍然存在-Apple的站点地图就是一个很好的例子-对于访问页面超过十二个的网站,访问者仍然有用。 (如果您的站点有九个或更少的页面,则每个页面都应该彼此链接,而无需站点地图)。

However, traditional site maps have several drawbacks:

但是,传统站点地图有几个缺点:

  • As static HTML pages, they are a pain to keep updated, especially on a busy site: every new page that is uploaded to the site must also be entered as a link on the site map page. (This can be alleviated to some degree by utilizing PHP or another server-side language).

    作为静态HTML页面,它们很难保持更新,尤其是在繁忙的网站上:上传到该站点的每个新页面也必须作为站点地图页面上的链接输入。 (这可以通过使用PHP或其他服务器端语言在某种程度上减轻)。

  • In complex and dynamic sites, files that are missing from the site map and not linked to from any other page might be missed by search engines when they index the site.

    在复杂而动态的网站中,搜索引擎在为网站建立索引时可能会丢失站点地图中缺少且未链接到任何其他页面的文件。
  • Traditional Sitemaps (note the capital S) give no indication of the relative importance of pages, nor how frequently they are changed or updated.

    传统站点地图(请注意用大写字母S表示)不会显示页面的相对重要性,也无法显示页面的更改或更新频率。
  • They also do not list resources, such as images and video, that have become vital to web searches.

    它们也不会列出对于网络搜索至关重要的资源,例如图像和视频。

The answer to these problems are XML site maps (note the lowercase s). These site maps are not intended to be read by visitors: rather, they are guides for search engines to the resources on your site. XML site maps are supported by Google, Bing, and Yahoo.

这些问题的答案是XML网站地图(请注意小写的)。 这些站点地图并非旨在供访问者阅读:相反,它们是搜索引擎针对您站点上资源的指南。 Google,Bing和Yahoo支持XML网站地图。

I will use a portion of the site map for this site as an example:

我将以该站点的部分站点地图为例:

<?xml version="1.0" encoding="UTF-8"?>
	<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.sitemaps.org/schemas/sitemap-image/1.1">
	<url>
	<loc>http://thenewcode.com/217/CSS3-Vendor-Prefixes</loc>
		<lastmod>2010-11-14</lastmod>
		<changefreq>monthly</changefreq>
		<priority>0.8</priority>
</url>

As you can see, the xml site map goes into far greater depth than a standard traditional Sitemap, and supplies far more information that is useful to a search engine. It is important to note that priority is not an indication to the search engine on how high to rank your page, but on the page’s relationship to the purpose of the site as a whole.

如您所见,XML站点地图比标准传统站点地图的深度要大得多,并且提供了更多对搜索引擎有用的信息。 重要的是要注意, priority 并不是指示搜索引擎如何对页面进行排名,而是页面与站点目的的关系。

Obviously writing a complete XML site map is a serious undertaking for a even a moderately complex website. Fortunately there are tools to help you:

显然,即使对于一个中等复杂的网站,编写完整的XML网站地图也是一项艰巨的任务。 幸运的是,有一些工具可以帮助您:

  • The sitemaps.org website provides a good overview of the site map schema.

    sitemaps.org网站很好地概述了站点地图架构。

  • XML-Sitemaps can automatically generate a free site map for your site, covering up to 500 pages. (It does not include images or videos by default – that is a paid option).

    XML-Sitemaps可以自动为您的站点生成一个免费的站点地图,覆盖多达500页。 (默认情况下,它不包括图像或视频-这是一个付费选项)。

Once your site map is complete, upload it to the root of your site (typically with the filename sitemap.xml), alongside your index page. While search engines should find the file automatically and use it to help index your site, there is nothing wrong with directing Google, Bing and Yahoo to your site map in order to prompt an indexing attempt, or when the file changes significantly.

站点地图完成后,将其上传到站点的根目录(通常使用文件名sitemap.xml )以及索引页面。 虽然搜索引擎应该自动找到该文件并使用它来帮助为您的网站建立索引,但是将Google,Bing和Yahoo定向到您的站点地图以提示进行索引尝试或文件发生重大更改时没有任何问题。

  • Google can be alerted about your site map at Google WebMaster. (You will need a Google account to sign in, and may need to place a special verification meta tag in your index page to prove that you are the owner of the site).

    可通过Google WebMasterGoogle发出有关您的站点地图的警报。 (您将需要一个Google帐户登录,并且可能需要在索引页中放置一个特殊的验证元标记以证明您是该网站的所有者)。

  • Bing accepts sitemaps at its Webmaster Tools sub-site.

    Bing在其网站站长工具子网站上接受站点地图。

By themselves, XML site maps do not guarantee higher ranking in search engines, or even that the search engine will use every piece of information presented in the site map. They can certainly help lead search engines to resources on your site that might otherwise be overlooked, and supply more contextual information about your site as a whole… and that is always a good thing.

XML站点地图本身不能保证在搜索引擎中具有更高的排名,甚至不能保证搜索引擎将使用站点地图中显示的每条信息。 它们肯定可以帮助引导搜索引擎访问您网站上可能被忽略的资源,并提供有关您网站整体的更多上下文信息……这始终是一件好事。

翻译自: https://thenewcode.com/218/Generate-an-XML-Sitemap

织梦生成xml网站地图

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐