How to Create an XML Sitemap and Check Submission Errors

Person working at a desktop computer

Start With a Maintained Sitemap, Not an Indexing Promise

An XML sitemap is a file that helps search engines find the public pages you want considered for crawling. It is a discovery hint, not a promise that any URL will be crawled, indexed, or ranked. A dependable sitemap reflects the pages your website actually wants in search results and stays aligned as those pages change.

Start With the Sitemap Your Site Already Has

Before creating anything new, look for an existing sitemap generated by the CMS, SEO plugin, or development team. Common locations include /sitemap.xml and a sitemap index referenced in robots.txt. Open the file in a browser, then identify who owns it and how it updates.

Avoid adding another generator simply because a new tool offers one. Two generators can publish overlapping or conflicting URL lists, making maintenance harder. If the existing sitemap is sound and maintained, improve its URL selection rather than replacing it.

For a plain-language explanation of what sitemaps can and cannot do, see Google’s sitemap overview. Use this article for creation and validation; use the separate Search Console sitemap troubleshooting guide when the report itself needs deeper diagnosis. For related publishing context, see blog content for SEO; for broader technical support, review SEO auditing companies.

Build the Right URL Inventory First

The sitemap should contain the preferred public URLs that deserve to appear in search. Start with the URLs your CMS or crawl report identifies, then review each one against the signals that matter:

  • It returns a normal successful response for visitors and bots.
  • It is not blocked from indexing by a noindex directive.
  • Its canonical points to that same preferred URL.
  • It is not a redirect, duplicate filter page, internal search result, staging page, or utility page.

Use an Illustrative URL Checklist

A short URL-level review catches common mistakes before submission. The examples below are hypothetical:

  • Include https://example.com/services/technical-seo/ when it is the canonical, indexable public service page.
  • Exclude https://example.com/services/technical-seo/?source=newsletter when the parameter version duplicates the canonical page.
  • Exclude https://example.com/old-service/ after it permanently redirects to a replacement page.
  • Remove https://example.com/private-preview/ when it is intentionally unavailable for indexing.

A sitemap is not access control. A listed page can still be restricted by other controls, and removing a URL from a sitemap does not deindex it. Use the appropriate page-level removal or indexing controls when a page must leave search results.

Keep the File Technically Straightforward

Google’s sitemap-building guidance says a sitemap may contain up to 50,000 URLs and be up to 50 MB when uncompressed. Use UTF-8 encoding and fully qualified, absolute URLs. Include canonical, indexable URLs rather than duplicates or redirects. Use lastmod only when it reflects a meaningful page update. Google ignores the priority and changefreq values, so they should not drive editorial or technical decisions.

A Practical Sitemap Creation and Submission Workflow

1. Inspect the Existing CMS Sitemap

Find the current sitemap and confirm whether it is automatically maintained. A CMS or established SEO plugin is usually the best owner for a content-driven site because it can add, update, and remove URLs as publishing changes. For a custom platform, ask the development team which service generates the sitemap and how exceptions are handled.

2. Choose the Preferred Public URLs

Review the inventory before it reaches the sitemap. Keep canonical pages that are available to users and intended for search. Remove redirected URLs, duplicate parameter pages, obsolete product paths, and non-indexable pages. Do not assume a page belongs in the file just because it exists in the CMS.

3. Choose One Maintained Generator

Use one source of truth: the CMS, a well-maintained plugin, or a developer-managed generator. Multiple sources introduce avoidable uncertainty when URLs are added or removed. Document the owner and the editing path so content, marketing, and development teams know where sitemap changes originate.

4. Validate URL Behavior Before Submission

Sample important URLs from the file. Check that they load at the preferred address, resolve without a redirect, and use the intended canonical. Compare the sitemap with your internal-link structure so key pages are discoverable through normal navigation as well. Sitemap inclusion supports discovery, but it does not replace useful internal links or clear page-level indexing signals.

5. Submit the Actual Sitemap URL to the Verified Property

In Search Console, open the verified property that matches the site and submit the live sitemap or sitemap-index URL. The report helps Google process the file and shows whether it was read, but a successful submission is distinct from indexing each URL. Google’s Search Console sitemap report help explains how to submit a sitemap and review its status.

Submit the URL the site actually serves, not a downloaded local copy or a temporary generator preview. If the sitemap moves, update the submitted URL and any reference in robots.txt.

Maintain the Sitemap as the Website Changes

A sitemap needs ongoing ownership, not a one-time setup. Update or validate it when publishing workflows, redirects, templates, or site structure change. This is especially important when a page moves, is consolidated, or becomes intentionally non-indexable. This same review process can also surface deep crawling and indexing issues that extend beyond the sitemap itself.

Use a Clear Maintenance Handoff

Owner Action Verification
Content team Publish, update, redirect, or retire a page Confirm the CMS sends the intended canonical URL to the sitemap
Development team Change templates, routing, or sitemap logic Test representative URLs and the sitemap index after deployment
SEO owner Review discovery and indexing signals Check the submitted sitemap report and investigate only meaningful discrepancies

Know What to Check After Common Changes

After publishing a new page, confirm it is public, canonical, indexable, internally linked, and present when the generator updates. After a redirect, make sure the old URL leaves the sitemap and the preferred destination is eligible instead. After deleting a page, remove it from the sitemap and choose the appropriate response or redirect strategy; removal from the file alone does not remove it from search.

Template or platform changes deserve extra care because they can change canonical tags, response behavior, internal links, or generator rules across many pages at once. Test a small representative set before treating the sitemap as dependable.

For teams that need help coordinating technical changes with ongoing publishing, SEO content services can support a maintenance workflow. That work should focus on clean publishing signals and review, not promises of indexing.

Keep Discovery Signals Useful

A well-managed XML sitemap gives search engines a current, organized list of the pages that matter most. The strongest approach is practical: use one maintained generator, include preferred indexable URLs, validate behavior before submission, and revisit the file when publishing or technical changes occur.

Treat the sitemap as one part of a larger discovery and indexing process. Clear internal links, accurate canonicals, useful content, and intentional page-level indexing settings remain important. With that workflow in place, the sitemap stays useful without being treated as a promise of results.