Http://www.yellowwee.com.cn/post/2007/10/%e7%94%9f%e6%88%90%e8%87%aa%e5%b7%b1%e7% AB %99%e7%82%b9%e7%9a%84SiteMap.aspx
Many people have heard of Seo technology. The translation of SEO (Search Engine Optimization) into Chinese is "Search Engine Optimization ". Is to study how to improve the ranking of your website in the search engine. One of them is to add sitemap to your site, so that search engines can better understand your website and easily index your page.
Sitemap allows you to "tell" the search engine the URL of your website page. Sitemap is actually an XML document that lists the URLs on your site pages. The following is an example of sitemap:
<? XML version = "1.0" encoding = "UTF-8"?>
<Urlset xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9">
<URL>
<Loc> http://www.example.com/</loc>
<Lastmod> 2005-01-01 </lastmod>
<Changefreq> monthly </changefreq>
<Priority> 0.8 </Priority>
</URL>
<URL>
<Loc> http://www.example.com/catalog? Item = 12 & amp; DESC = vacation_hawaii </loc>
<Changefreq> weekly </changefreq>
</URL>
</Urlset>
Are you confused when you see such a long string of XML? <Loc> <changefreq> what do these mean?
Fortunately Google provides us with a sitemap generator (sitemap generator) that you can go to http://www.sourceforge.net/project/showfiles.php? Group_id = 137793 & package_id = 153422 download here.
If you do not like Google, there is also a third-party sitemap generator. Http://code.google.com/sm_thirdparty.html
If you are interested in understanding the sitemap protocol, you can go to the https://www.google.com/webmasters/tools/docs/en/protocol.html to understand.
The following describes what preparations are required to use Google's sitemap generator:
1. First, you must have the permission to run scripts on the Web server. (If you are using a VM, you can run sitemap in the local test environment and replace the connection with your VM address)
2. Because Google's generator is written in Python, to run it, you must install Python 2.2 or a later version. (Download the http://www.python.org/download from here)
3. Of course, after generating sitemap, you need to put it on your server or virtual host.
How to generate sitemap:
1. Download Google sitemap builder: http://www.sourceforge.net/project/showfiles.php? Group_id = 137793 & package_id = 153422
2. Create a configuration file
Modify the example_config.xml file (included in the downloaded package) and find
<Site base_url = "http://www.example.com/" store_into = "/var/www/docroot/sitemap.xml.gz" verbose = "1">
Modify base_url to your own URL
Modify store_into to store sitemap addresses for you
After modification, my website is:
<Site base_url = "http://www.yellowwee.com.com.cn/" store_into = "sitemap. xml" verbose = "1">
Set the remaining part of the configuration file according to example_config.xml.
3. Upload the script to the server: You need to upload config. xml and sitemap_gen.py to your web server.
4. Run the generate script sitemap_gen.py to generate sitemap
Python sitemap_gen.py -- Config = <path/config. xml>
After submitting the generated sitemap to Google, Google will index your site based on your sitemap, so that your site's chances of appearing in the Google search results will be greatly increased. (Because many websites dynamically generate pages, although Google will index dynamic pages, if an index error occurs, the index will be skipped. After submitting sitamap, goolge will know how to index your site to reduce the chance of no index due to errors)
Submit sitemap to Google. Please go to "Google website administrator tool ". There are also some tools Google has prepared for webmaster in the "Google website administrator tool". If you are interested, you can check them by yourself.