Create and submit a sitemap
Building and Submitting a Sitemap for Google Search
A sitemap acts as a roadmap for search engines, guiding them towards all the important pages on your website. This comprehensive guide explains how to create a sitemap and ensure Google can access it for optimal indexing.
Understanding Sitemaps
Before diving into the technical details, it's crucial to grasp the basics of sitemaps. If you're unfamiliar with them, consider reviewing an introductory guide on sitemaps for a foundational understanding.
Google adheres to the established sitemap protocol, supporting various formats, each with its strengths and weaknesses. Choosing the right format depends on the specific website and its setup. Google doesn't favor one format over another.
Let's break down the different sitemap formats:
XML Sitemap
- Highly versatile and extensible. - Accommodates additional data for images, videos, news content, and localized page versions. - Supported by most CMS platforms with plugins readily available.
- Can become complex to manage, especially for larger websites or those with frequently changing URLs.
RSS, mRSS, Atom 1.0
- Generally easy to provide due to automatic generation by most Content Management Systems (CMS). - Can relay information about videos to Google.
- Limited functionality; besides HTML and indexable text content, it only accommodates video information (no images or news). - Can be difficult to manage.
Text Sitemap
- Simplest format, ideal for large websites. - Easy to create and maintain.
- Restricted to HTML and indexable text content only.
Sitemap Best Practices
To ensure optimal effectiveness, adhere to these best practices outlined by the sitemap protocol:
Size Limits
Each sitemap file, regardless of format, has a size limit of 50MB (uncompressed) or 50,000 URLs.
For websites exceeding these limits, divide the sitemap into multiple files.
An optional sitemap index file can list all individual sitemaps and be submitted to Google.
Submitting multiple sitemaps and/or a sitemap index file allows for performance tracking of each sitemap through Google Search Console.
File Encoding and Location
Use UTF-8 encoding for all sitemap files.
Host sitemaps anywhere on your website.
For optimal impact, place the sitemap at the site's root directory. This ensures the sitemap influences all files within the website, maximizing its effectiveness.
Referenced URLs' Properties
Employ fully-qualified, absolute URLs (e.g.,
https://www.example.com/mypage.html
) instead of relative URLs (e.g.,/mypage.html
). This helps Google accurately crawl the specified URLs.Include URLs you want indexed by Google and appearing in search results.
For pages with separate mobile and desktop versions, it's generally recommended to include only the canonical URL in the sitemap. However, if including both is necessary, annotate the URLs to distinguish between the versions.
For a comprehensive list of best practices, refer to the official sitemaps protocol documentation.
Example: XML Sitemap
The XML sitemap format, due to its versatility, is widely used. It allows for the inclusion of additional information, enriching the data provided to Google.
Here's an example illustrating a basic XML sitemap structure:
This simple structure can be expanded to incorporate details about images, videos, and other content types.
For detailed examples and comprehensive documentation on XML sitemaps and their extensions, refer to sitemaps.org.
Remember to properly escape all tag values within the XML file according to XML standards.
Last updated