How RSS Makes Your Site Attractive to Search Engines: RSS Tutorials and Tips - A Look at XML Syntax and Definitions
(Page 4 of 8 )
Let’s look at the XML syntax and definitions of the sitemap itself. This is what an actual sitemap feed might look like:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<url>
<loc>http://somehermitcrabsite.com/index.html</loc>
<lastmod>2005-08-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>http://somehermitcrabsite.com/hermit-crab-growth.html</loc>
<lastmod>2005-08-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
The XML syntax and definitions:
- The first two lines are the same as in the sitemap index, with the exception of the <urlset> tag, as defined in the next statement.
- The <urlset> and </urlset> tags “ encapsulates the file and references the current protocol standard.”* These are the parent tags for the set.
- The <url> and </url> tags are similar to our <item> and </item> tags of our regular RSS feed. They group the information to identify one URL and its information, into a set. These are child tags, as are the rest of tags included within the parent <urlset> and </urlset> tags.
- The <loc> and </loc> tags are similar to our <link> and </link> tags, but notice the URL is at the beginning of the set. This is because it is the most important part of the set.
- The <lastmod> and </lastmod> tags indicate when the page was last modified. This tag is optional.
- The <changefreq> and </changefreq> tags tell Googlebot how often it should come back to those pages and crawl them for changes in order to update its index. This tag is optional.
- Last are the <priority> and </priority> tags. This is a rating scale, from 0.0 to 1.0 that indicates to the spider how important this page is in the relative scheme of things in regards to the entire website. This tag is optional.
For more information on what these tags mean, visit Google’s Sitemap Help Section.
Google is very specific on how a sitemap should be structured. Once your sitemap is done, be sure to validate it.
Next: Utilities for RSS and Site Syndication >>
More Search Optimization Articles
More By Jennifer Sullivan Cassidy