Sitemap Format
For a sitemap protocol to be appropriately recognizable, your XML file must contain some tags. Furthermore, the sitemap file is also required to be UTF-8 encoded. How this works will be explained shortly.
Basic Sitemap example
To get you started, below is a very basic sitemap file example that can even guide you to create your first sitemap. In this example, we have used a single URL:
There are more complicated examples of sitemaps that you can find elsewhere in this tutorial,
XML tags
To enable you understand better, the lines of the sitemap file have been revised below, one after another.
- Opening Tag: You must start every Sitemap XML file with an opening tag <urlset> and end it with </urlset>.
- Parent Entry: Start each “parent” entry with <url> tag and end it with </url>.
- Child Entries: Similarly, each “child” entry should be contained between <loc> and </loc> tags.
- URL: Insert a URL that should start with http:// just after a <loc> tag.
**Note that the URL shouldn’t exceed 2048 characters.
- A date in the format has to be inserted to the <lastmod> tag.
It is important to note that this tag doesn’t require modification every time the document is changed. The dates will be available whenever the search engines crawl the documents.
- To determine the frequency in which a page is modified and how frequent it should be indexed, the <changefreq> tag is used to hint to the crawlers.
Bear in mind that the crawl bot behavior is not determined by the value indicated as it depends entirely on the search engine.
One of the following values are expected by the <changefreq> tag; never, yearly, monthly, weekly, daily, hourly or always.
It is important to note that “always” should only be used for pages that are thoroughly created or modified upon each access. On the other hand, the “never” value doesn’t necessarily mean that the page will never be indexed; it sure will, like once a week.
- The <priority> value can range from 0.0 to 1.0
Priority value only indicates personal preferences on how you would like your site indexed. Pages that have not been prioritized by default have the value set at 0.5. This means that pages with higher priority value will be indexed first in descending order.
Note that priority value is relative and therefore should only be used for the website and not every page. Even if you were to prioritize all pages, there is no guarantee that they will be indexed more often because the value is not used to compare one website to another.
Exceptional characters in the Sitemap file
As earlier discussed, every sitemap has to be UTD-8 coded, which can easily be done upon saving the sitemap file. UTF-8 format is compatible with nearly all text editors.
Entity escape codes for the following characters should be used in all data in the sitemap.
Character Escape Code
- Ampersand & &
- Single Quote ' '
- Double Quote " "
- Greater Than > >
- Less Than < <
Finally, always remember that the overall size of your sitemap shouldn’t exceed 10MB. You can easily create sitemaps with the help of our website mapping tool, http://dynomapper.com/.
Sitemap Tutorial
- Sitemap Tutorial
- Sitemap Format
- What Does a XML Sitemap Look Like?
- How to Have Multiple Sitemaps for One Website
- How to Validate Sitemaps
- How to submit your sitemap to search engines
Popular Articles
- Do Sitemaps Help SEO? The Importance of Sitemaps for SEO
- What are the Different Sitemap Formats? How and When to Use Them
- Common Sitemaps Errors and How to Fix Them
- Why You should be using a Google News Sitemap
- 7 Benefits Of Google Sitemaps You Cannot Just Ignore
- Why do websites need both a HTML and XML sitemap?
- What Are Sitemap Extensions And How To Use Them?
- XML Sitemap Best Practices
- Why You Need to Update Your Sitemap Regularly
- Frequently Asked Questions About Sitemaps
- Multilingual and Multinational Sitemaps for SEO
- What is a XML sitemap?
- Qualities of a Good Sitemap
- Learning About Sitemaps
- HTML Sitemaps - A Table of Contents for Your Website
- HTML vs. XML Sitemaps: Differences and Uses
- Building the ULTIMATE XML Sitemap for Your Websites
- Important SEO Tips for Sitemaps
- XML Sitemaps Best Practices
- How to Get the Best From XML Sitemaps
- Three Reasons Why Sitemaps Are a Must-Have
- XML Sitemaps: An Important Webmasters’ Resource
- Significance of Multiple Sitemaps
- Why Use a Visual Sitemap Generator