XML sitemaps complete guide

An XML sitemap is a file that lists the important pages on your website so search engines can find, crawl and index them more efficiently. It acts as a roadmap for Google, telling it which URLs matter and when they were last updated.

A sitemap does not directly boost rankings, but it helps Google discover your content, especially on larger sites or pages that are not well linked internally. According to Google’s documentation, a sitemap tells search engines about the pages and files you consider important. A single sitemap file can hold up to 50,000 URLs and must be no larger than 50MB uncompressed, so getting it right is a small task with a real payoff for indexing.

Key Takeaways

  • A sitemap is a discovery aid. It helps search engines find and crawl your important pages, especially deep or new ones.
  • It does not directly improve rankings. It improves indexing, which is a prerequisite for ranking at all.
  • Limits matter. Up to 50,000 URLs and 50MB per file. Larger sites use a sitemap index that points to multiple sitemaps.
  • Keep it clean. Include only indexable, canonical, live pages. Exclude redirects, error pages and blocked URLs.
  • Submit it in Google Search Console and reference it in your robots.txt file.

Table of Contents

Who This Guide Is For

This guide is for Malaysian business owners, marketers and developers who want their pages found and indexed by Google. It covers what an XML sitemap is, when you need one, what to include, and how to create and submit it. It assumes no coding background, since most platforms generate sitemaps automatically.

What Is an XML Sitemap?

An XML sitemap is a structured file, usually at yoursite.com/sitemap.xml, that lists the URLs you want search engines to know about. For each URL it can include the page location and, optionally, when it was last modified. Search engines read this file to understand your site’s structure and to discover pages they might otherwise miss. It is written for machines, not humans, though most people never read the raw file because their platform generates it automatically. Large sites split their URLs across several sitemaps and reference them from a single sitemap index file.

Do You Actually Need an XML Sitemap?

Google can crawl small, well-linked sites without a sitemap, but a sitemap becomes valuable when:

  • Your site is large, with many pages that are hard to reach through links.
  • Your site is new and has few external links pointing to it.
  • You have pages that are not well linked internally, such as deep product or blog archives.
  • Your content changes often and you want faster discovery of updates.

For most Malaysian business websites, having a clean sitemap is a sensible default.

Not sure if Google is finding and indexing all your important pages? Newnormz runs a free SEO audit and website health check that pinpoints exactly what is holding your rankings back. Get your free website health check.

What to Include in Your Sitemap

Include Exclude
Canonical, indexable pages Redirected URLs (301 or 302)
Live, valuable content Error pages (404, 5xx)
Pages you want ranked Pages blocked by robots.txt or noindex
Recently updated pages Duplicate or thin pages

A tidy sitemap that lists only pages you genuinely want indexed sends a clear, trustworthy signal.

How to Create and Submit an XML Sitemap: 4 Steps

1. Generate it automatically

Most platforms create a sitemap for you. On WordPress, SEO plugins like Rank Math or Yoast generate and update one automatically, so you rarely need to build it by hand.

2. Check that it is clean

Open your sitemap and confirm it lists only live, canonical, indexable pages, with no redirects, error pages or blocked URLs.

3. Reference it in robots.txt

Add a line pointing to your sitemap in your robots.txt file so crawlers can find it easily, in addition to submitting it directly.

4. Submit it in Google Search Console

In Search Console, use the Sitemaps report to submit your sitemap URL. This confirms Google can read it and lets you monitor how many pages are discovered and indexed. It is also worth submitting the same sitemap to Bing Webmaster Tools, which uses sitemaps in the same way and gives you a second search engine’s index coverage.

Example: A Simple sitemap.xml File

Here is what a minimal sitemap looks like for a site with two pages. Each URL sits inside its own <url> entry, with the location, the date it was last modified, how often it changes, and a priority relative to other pages:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com.my/</loc>
    <lastmod>2026-07-01</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
  <url>
    <loc>https://example.com.my/about/</loc>
    <lastmod>2026-06-15</lastmod>
    <changefreq>monthly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

You almost never write this by hand. Most WordPress SEO plugins, such as Rank Math or Yoast, generate this file automatically at /sitemap_index.xml and keep it updated as you add or remove pages. Your job is simply to submit that URL in Google Search Console and check it lists only clean, indexable pages.

Common Mistakes to Avoid

  • Listing non-indexable pages. Including noindex, blocked or redirected URLs confuses crawlers.
  • Including 404 and error pages. Dead URLs waste crawl budget and dilute trust in the file.
  • Exceeding the limits silently. Over 50,000 URLs or 50MB, split into multiple sitemaps with an index.
  • Forgetting to resubmit after big changes. Major structural changes should be reflected and resubmitted.
  • Assuming a sitemap forces indexing. It aids discovery, but Google still decides what to index.

The Sitemap Checklist

  • Your sitemap lists only canonical, indexable pages.
  • It excludes redirects, error pages, and blocked or thin pages.
  • It stays within 50,000 URLs and 50MB per file (index if larger).
  • It is referenced in robots.txt.
  • It is submitted in Google Search Console.
  • It updates automatically when you add or remove pages.

Frequently Asked Questions

What is an XML sitemap used for?

An XML sitemap lists the important pages on your website so search engines can find, crawl and index them efficiently. It acts as a roadmap that highlights which URLs matter, which is especially useful for large, new or poorly linked sites.

Does an XML sitemap improve SEO rankings?

Not directly. A sitemap helps search engines discover and index your pages, which is a prerequisite for ranking, but it does not itself raise your position. Rankings still depend on content quality, relevance, links and technical health.

How many URLs can a sitemap contain?

A single sitemap file can hold up to 50,000 URLs and must be no larger than 50MB uncompressed. If your site is bigger, split URLs across multiple sitemaps and list them in a sitemap index file, which you then submit to Google.

Where is my sitemap located?

It is usually at yoursite.com/sitemap.xml or a similar path generated by your platform. On WordPress with Rank Math or Yoast, the plugin creates one automatically. You can also find and submit it through the Sitemaps report in Google Search Console.

How often should I update my sitemap?

You usually do not update it manually. Platform-generated sitemaps refresh automatically when you add or remove pages. Just ensure it stays clean, listing only live, canonical, indexable pages, and resubmit in Search Console only if you make major structural changes.

Should I include every page in my sitemap?

No. Include only canonical, indexable pages you want ranked. Exclude redirects, error pages, duplicate or thin pages, and anything blocked by robots.txt or noindex. A focused sitemap of your best pages is more useful than a bloated one.

The Bottom Line

An XML sitemap is a simple but valuable file that helps Google find and index the pages that matter, within the 50,000-URL and 50MB limits. Generate it with your SEO plugin, keep it clean, and submit it in Search Console.

Get a Free Website Health Check from Newnormz

Understanding sitemaps is one thing; knowing whether Google is actually indexing your key pages is another. Our team will audit your site’s indexing, sitemaps and crawl health, indexing and technical health, show you exactly what is costing you rankings and enquiries, and hand you a clear, prioritised fix list. No obligation, no jargon.

Request your free SEO audit and website health check, or explore our SEO services in Malaysia.

Related reading: How to Improve Website Loading Speed | Hreflang Tags Explained | Best Free SEO Tools

Scroll to Top
newnormz-logo-white-new-png
website-assets-02-png
Website SEO Audit
(Worth RM1,200)!
FREE SEO Audit with AI Visibility Check
Limited to May Only!