Teach you how to create GoogleSitemap

Source: Internet
Author: User
Tags iso 8601
I wrote my own GoogleSiteMap file and provided a detailed tutorial here. I hope it will be helpful to you. GoogleSiteMap's functions and Protocol formats: GoogleSiteMapProtocol is a site map protocol launched by Google.

After a long time, I wrote my own Google SiteMap file. here I will give you a detailed tutorial and hope to help you.
Role of Google SiteMap and detailed explanation of protocol format

Google SiteMap protocolis a site map agreement promoted by google. This document is based on the robots.txt file protocol and has been upgraded. In the official Google guide, it is pointed out that websites with Google SiteMap files will be more conducive to crawling indexing of Google web crawlers, which will improve the efficiency and accuracy of indexing website content. The file protocol applies a simple XML format and uses a total of six tags. The key tags include the link address, update time, update frequency, and index priority.

The format of the Google SiteMap file is as follows:





Http://www.chinaz.com
T04: 20-
Always
1.0


Http://www.chinaz.com/300687.html
2005-06-02T20: 20: 36Z
Daily
0.8


 

XML tag

Changefreq: page content update frequency.
Lastmod: Last modification time of the page
Loc: Permanent link address of the page
Priority: priority over other pages
Url: relative to the parent tag of the first four tags
Urlset: parent label relative to the first five tags
I will explain every tag in the xml file in one sentence:
& Lt; urlset xmlns = & quot; thenTags have the same effect.
& Lt; url & gt; this is the definition entry of a specific link. every link you want to display in the SiteMap file must be used And This is required.
Http://www.chinaz.com
Use Description of the specific link address. Note that some special characters in the link address must be converted to escape characters defined in XML (HTML), as shown in the following table: characters after escape
HTML Character encoding
And (and )&&&
Single quotes '''
Double quotation marks """
Yu No. >>>
Minor signs <

& Lt; lastmod & gt; 2005-06-03T04: 20: 32-08:00 & lt;/lastmod & gt; Is used to specify the last update time of the link, which is very important. Google's robot will first compare the last update time of the last index record before indexing this link. if the time is the same, it will skip the next index. Therefore, if the content of your link changes based on the content of the last Google index, you should update the time so that Google will re-analyze the link content and extract keywords at the next index. The time format specified in ISO 8601 must be used for description. the format is as follows:
Year (YYYY (2005)
Year and month: YYYY-MM (2005-06)
YYYY-MM-DD)
YYYY-MM-DDThh: mmTZD (2005-06-04T10: 37 + 08: 00)
YYYY-MM-DDThh: mmTZD (2005-06-04T10: 37: 30 + 08: 00)
Here, it should be noted that the TZD is specified as the local time zone mark, like China +
<Changefreq> always </changefreq> ), yearly (year) can be used for links that were a long time ago or that are no longer updated ). Here we can describe these words: "always", "hourly", "daily", "weekly", "monthly", "yearly ", I don't need to explain the specific meaning. I can understand the meaning of words.
& Lt; priority> 1.0 & lt;/priority>; Is used to specify the priority ratio of this link to other links, this value is set to between 0.0-1.0
AndAnd, These two are used to close the xml tag, which is different fromAndIs a truth
Note that the xml file must be in UTF-8 encoding format. Whether you manually generate the file or use code to generate the file, we recommend that you check whether the xml file is UTF-8 encoded, the easiest way is to open the xml in Notepad and then choose encoding (or converter) as the UTF-8 when saving it.
Log onto Google and submit your SiteMap file. let Google start crawling and open it.

Click Add a Sitemap + to go to the submit page to submit the Sitemap file. We recommend that you store the file in the root directory of your site. After submitting your Sitemap URL to Google, you can see that the URL already exists in the list. However, this does not take effect yet. after several hours, the Status bar changes to OK, which indicates that it takes effect. if it is not OK, you can view the status indication explanation provided by Google to see why.

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.