Help search engines with site maps

Source: Internet
Author: User
Tags contains include requires root directory

The goal of building a website is to increase visibility and increase user traffic. Search engine optimization is a way to increase web traffic. Another way is to use a site map that allows you to specify which pages a search engine collects or indexes. Site Map This concept was originally developed by Google, and recently Yahoo and MSN agreed to apply this standard. This week we have a description of the site map standards.

The need to establish standards

Search engines use spiders to crawl on the Internet, locate pages and include them in a database. This process requires a lot of resources, and sometimes the pages you want to index are ignored, but useless pages are included. A typical example is the search for changes and new pages on the web, and the Google Googlebot spider that collects them and classifies them accordingly.

A site map provides a way for a site to identify which pages should be indexed and what new content is added to the site. Basically, it provides a communication channel between the search engine and the website. Theoretically, it alleviates the resource burden by reducing the processing objects of search engine spiders, but the current site map cannot replace the crawling process.

Site Map Introduction

A site map is an XML file that contains a URL table and related attributes that specify what content should be indexed for a particular Web site. The site map must be UTF-8 encoded. The following are the XML elements required by the Sitemap file:

<urlset>-Site Map file starts and ends with this tag, and the start tag must include the namespace (xmlns) attribute.

<url>-Each page in the file is included in this element.

<loc>-The actual address of the page specified in the file. It is a child element of the <url> element.

The following optional elements are also available in the file:

<lastmod>--A child element of the <url> element. It specifies when the Web page was last updated.

<changefreq>--A child element of the <url> element. It specifies how often Web pages are updated (often, hourly, daily, weekly, monthly, yearly, and never updated).

<priority>--A child element of the <url> element. It specifies the importance of pages within the site relative to other pages, valid values are 0.0-1.0, and the default value is 0.5.

The following site Map sample shows how to apply these elements to a sample Web page. It specifies the home page for an assumed web site, as well as its frequency of updates, the time of the last update, and the priority in the Web site.

<?xml version="1.0" encoding="UTF-8"?>
<urlsetxmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.test.com/</loc>
<lastmod>2006-11-20</lastmod>
<changefreq>daily</changefreq>
<priority>0.3</priority>
</url>
</urlset>

The location of the site map file is up to you, but its location determines the set of URLs that may be included in the file. For example, if the sample site map file above is located in Http://www.test.com/sitemap.xml, the site map file may contain any URLs that begin with http://www.test.com/. Therefore, we recommend that the site map file be stored in the root directory of the site. The size of the site map file must not exceed 10MB. If a file exceeds this limit, it needs to be compressed using gzip.

Create a site Map

Since site maps are based on XML, you can easily use any text editor to create and edit them, but you can also apply specialized tools. The following list provides some of the current tools:

Node Map: A tool for generating and confirming Web site map XML files.

Gsitemap: An application of the. NET framework to build a Web site Map generation tool. Phpsitemapng: a free website map builder written in PHP.

Notify search engine

After creating a site map file, you should submit it to a search engine. Each search has its own site map submission interface. Google's Webmaster Toolkit contains a site map submission page. You must sign up for an account before you use it. Yahoo also has a free sitemap submission page, but it must also register an account before using it. Other search engines will also follow Google, Yahoo and MSN to provide similar functionality.

Other tools

Search engine Web page crawling process is slow and requires a lot of resources. Site Map provides a way to specify what content should be included in the site and search for it. They build simple text files like XML, but there are a number of tools to help you build Web site map files. Now, they are just complementing the current process.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.