What is Sitemap?
Sitemaps are an easy way for webmasters to inform search engines about pages on their sites that are available for crawling. In its simplest form, a Sitemap is an XML file that lists URLs for a site along with additional metadata about each URL (when it was last updated, how often it usually changes, and how important it is, relative to other URLs in the site) so that search engines can more intelligently crawl the site.
Sitemap files extension and location
Create a file called sitemap.xml and write the commmand.
After writing all and save the file with extension .xml, upload it your root directory. So the url of your sitemap.xml is ..
After writing all and save the file with extension .xml, upload it your root directory. So the url of your sitemap.xml is ..
http://www.mydomain.com/sitemap.xml
What does a sitemap
A sitemap.xml file tell the search engines about your site content.So it is easy to indexing.
Syntax of some tags
The first line of this code explain the version of xml and encoded in utf-8
Second line contains the validation of the standart of sitemap.xml. This segment contains all the contents of your file
tag you will describe all of your content in your site
: contains the url of content
: type the date of last modification
: type the change freqiency (daily,weekly,monthly etc)
: set the priority 0.0 to 1.0
Second line contains the validation of the standart of sitemap.xml. This segment contains all the contents of your file
tag you will describe all of your content in your site
: contains the url of content
: type the date of last modification
: type the change freqiency (daily,weekly,monthly etc)
: set the priority 0.0 to 1.0
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc></loc> <lastmod></lastmod> <changefreq></changefreq> <priority></priority> </url> </urlset>
Example of a sitemap file
Suppose a domain called www.mydomian.com and its pages are
about-us.php
content.php
update.php
contact-us.php
features.php
projects.php
about-us.php
content.php
update.php
contact-us.php
features.php
projects.php
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.mydomain.com/about-us.php</loc> <lastmod>2011-05-22</lastmod> <changefreq>weekly</changefreq> <priority>0.6</priority> </url> <url> <loc>http://www.mydomain.com/</loc> <lastmod>2011-05-22</lastmod> <changefreq>weekly</changefreq> <priority>1.0</priority> </url> <url> <loc>http://www.mydomain.com/content.php</loc> <lastmod>2011-05-22</lastmod> <changefreq>weekly</changefreq> <priority>0.5</priority> </url> <url> <loc>http://www.mydomain.com/update.php</loc> <lastmod>2011-05-22</lastmod> <changefreq>weekly</changefreq> <priority>0.7</priority> </url> <url> <loc>http://www.mydomain.com/features.php</loc> <lastmod>2011-05-22</lastmod> <changefreq>weekly</changefreq> <priority>0.6</priority> </url> <url> <loc>http://www.mydomain.com/contact-us.php</loc> <lastmod>2011-05-22</lastmod> <changefreq>weekly</changefreq> <priority>0.3</priority> </url> <url> <loc>http://www.mydomain.com/projects.php</loc> <lastmod>2011-05-22</lastmod> <changefreq>weekly</changefreq> <priority>0.9</priority> </url> </urlset>
No comments:
Post a Comment