🔎
Google Search for beginners
Home
  • Introduction
  • Google Search Essentials
    • Overview
    • Google Search Technical Requirements
    • Spam Policies
  • SEO Basics
    • SEO Beginner's Guide
    • How Google Search Works
    • Creating Helpful, Reliable Content
    • Do You Need an SEO Expert?
    • Maintaining Your Website’s SEO
    • Developer's Guide to Google Search
    • How to Get Your Website Listed on Google
  • crawling and indexing
    • Overview
    • File formats Google can index
    • URL structure
    • Links
    • Sitemaps
      • Create and submit a sitemap
      • Manage your sitemaps
      • Image-specific sitemaps
      • News-oriented sitemaps
      • Video sitemaps and alternatives
      • Combining different sitemap types
    • Managing Google Crawlers
      • Reducing the crawl rate of Googlebot
      • Verifying the Googlebot and other Google crawlers
      • Managing Crawl Budget for Large Sites
      • HTTP Status Codes, Network, and DNS Errors
      • Types of Google Crawlers
      • Googlebot Explained
      • Google Read Aloud Service
      • Google API
      • Understanding Feedfetcher
    • Robots.txt
      • Creating and Submitting Robots.txt
      • Updating Robots.txt
      • Google's Interpretation of Robots.txt
    • Canonicalization
      • Specifying Canonicals Using rel="canonical" and Other Methods
      • Resolving Canonicalization Issues
    • Canonicalization for Mobile Sites and Mobile-First Indexing
    • AMP (Accelerated Mobile Pages)
      • Understanding How AMP Works in Search Results
      • Enhancing Your AMP Content
      • Validating AMP Content
      • Removing AMP Content
    • JavaScript
      • Fixing Search-Related JavaScript Issues
      • Resolving Issues with Lazy-Loaded Content
      • Using Dynamic Rendering as a Workaround
    • Page and Content Metadata
      • Meta Tags
      • Using Robots Meta Tag, data-nosnippet, and X-Robots-Tag noindex
      • noindex Explained
      • rel Attributes
    • Removals
      • Removing Pages from Search Results
      • Removing Images from Search Results
      • Handling Redacted Information
    • Redirects and Google Search
      • Switching Website Hosting Services
      • Handling URL Changes During Site Moves
      • A/B Testing for Sites
      • Pause or Disable a Website
Powered by GitBook
On this page
  1. crawling and indexing
  2. Sitemaps

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:

Format
Pros
Cons

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:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/blog/article-title</loc>
    <lastmod>2023-10-26T12:00:00+00:00</lastmod>
  </url>
  <url>
    <loc>https://www.example.com/about-us</loc>
    <lastmod>2023-10-25T18:30:00+00:00</lastmod>
  </url>
</urlset>

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.

PreviousSitemapsNextManage your sitemaps

Last updated 11 months ago