How to create a sitemap XML for your website

8 May 2026

SEO

Nicola Hughes

Get in touch

One of the foundational checks I carry out on every new client site is whether a properly configured XML sitemap exists and has been submitted to Google. It sounds like a small thing, but you would be surprised how often it is missing entirely, incorrectly set up or quietly out of date. Getting it right is one of the simplest and most impactful steps you can take for your site’s crawlability and indexation.

Here is everything you need to know about how to create a sitemap XML for your website, what to include, what to leave out and how to make sure Google can actually find it.

What is an XML sitemap?

An XML sitemap is a file that lists the important URLs on your website in a structured format that search engines can read. Think of it as a map you hand directly to Googlebot, telling it which pages exist on your site and which ones you want crawled and indexed.

Unlike an HTML sitemap, which is designed to help human visitors navigate a website, an XML sitemap is built specifically for search engine crawlers. It can also include useful metadata alongside each URL, such as when a page was last updated, which helps Google understand how fresh your content is.

A standard XML sitemap file looks something like this:

https://www.yoursite.com/page/ 2025-04-01 Each URL on your site that you want Google to discover and index sits within its own url block. The loc tag contains the full URL and lastmod records the date the page was last meaningfully updated.

Why does an XML sitemap matter for SEO?

Search engines discover pages primarily by following links. The problem is that some pages are hard to reach through links alone, whether because your internal linking is thin, your site is large or content is buried several clicks deep from the homepage.

An XML sitemap removes that discovery problem. It gives Google a direct list of every page you consider important, which supports faster indexation, helps ensure deep pages are not missed and gives you more control over what gets crawled.

For new websites in particular, a sitemap is essential. Without one, it can take significantly longer for Google to discover and index your content, especially when you have few external links pointing to your pages yet.

That said, a sitemap is not a guarantee of indexation. Google still evaluates every URL against its quality standards before deciding whether to include it in the index. What a sitemap does is ensure Google knows where to look.

How to create an XML sitemap: Three methods

Using your CMS or an SEO plugin

For the majority of websites, this is the easiest and most reliable approach. Most major content management systems either generate an XML sitemap automatically or offer a plugin that does it for you.

On WordPress, plugins like Yoast SEO and Rank Math both generate and maintain an XML sitemap automatically. Once enabled, the sitemap updates itself whenever pages are added, edited or removed, so you do not need to manage it manually. Your sitemap will typically be accessible at yourdomain.com/sitemap.xml or yourdomain.com/sitemap_index.xml.

Shopify, Wix, Squarespace and most other major platforms generate sitemaps automatically. Before doing anything else, it is worth checking whether your platform has already created one by visiting yourdomain.com/sitemap.xml in your browser.

Using a sitemap generator tool

If your site is not built on a CMS that handles sitemaps automatically, online sitemap generators are a practical alternative. Tools like Screaming Frog, Semrush and various free web-based generators can crawl your site and produce a properly formatted XML sitemap file ready to upload.

Screaming Frog is particularly useful for this because it also surfaces crawl issues at the same time, giving you a broader picture of your site’s technical SEO health alongside the sitemap itself. The free version supports up to 500 URLs, which is sufficient for many smaller sites.

Creating one manually

For simple sites with a small number of pages, it is possible to create an XML sitemap by hand using a plain text editor. The structure follows the format shown above: an XML declaration, a urlset wrapper and individual url entries for each page.

This approach is only practical for very small sites. For anything with more than a couple of dozen pages, an automated method is far more efficient and less prone to errors.

What to include in your XML sitemap

The purpose of an XML sitemap is to signal to Google which pages you want indexed. That means it should only contain URLs you genuinely want appearing in search results.

Include your key landing pages, service or product pages, blog articles and any other content that has real search value. These are the pages you want Google to find, crawl regularly and rank.

Do not include pages with NOINDEX tags, as adding a URL to your sitemap while simultaneously telling Google not to index it sends contradictory signals. Also leave out pages that redirect to other URLs, pages returning errors, admin and login pages, thank you pages, internal search results and any thin or duplicate content. Google’s guidance is clear on this: sitemaps should reflect the pages you want indexed, not act as a comprehensive record of every URL that exists on your site.

What to leave out

Including the wrong URLs in your sitemap can dilute its effectiveness and in some cases confuse crawlers about which version of a page is canonical.

Redirecting URLs should never appear in a sitemap. If a URL redirects elsewhere, the destination URL is the one that belongs there. Pages blocked in robots.txt should also be excluded, as listing them in a sitemap creates a conflict between the two signals. Paginated pages, parameter-based URLs and filtered category pages on e-commerce sites are also commonly worth excluding unless they have standalone SEO value.

As part of any technical SEO audit, reviewing what is and is not included in a sitemap is one of the first things I check. A bloated sitemap full of low-value or conflicting URLs is a common issue on sites that have grown quickly without a clear content governance process in place.

Sitemap index files: When you need more than one sitemap

Google imposes a limit of 50,000 URLs and 50MB per sitemap file. For larger sites, the solution is a sitemap index file: a parent file that references multiple individual sitemaps, each covering a different section or content type.

A well-structured sitemap index might separate blog posts, product pages, category pages and news content into their own files. This makes it much easier to monitor indexation by content type in Google Search Console and to isolate issues when specific sections are not being picked up as expected.

How to submit your XML sitemap to Google

Creating the sitemap is only half the job. You also need to make sure Google can find it.

The most direct method is submitting it through Google Search Console. Log in, select your property, navigate to Sitemaps under the Index section and enter the URL of your sitemap. Google will process it and report back on how many URLs it has found and indexed.

You should also reference your sitemap in your robots.txt file. Adding a line like “Sitemap: https://www.yourdomain.com/sitemap.xml” means any crawler visiting your site will find the sitemap location immediately, without needing to be told separately.

Once submitted, keep an eye on the Sitemaps report in Google Search Console. It will show you whether the sitemap has been successfully fetched, how many URLs were submitted and how many have actually been indexed. A significant gap between submitted and indexed URLs is often a signal worth investigating as part of a broader SEO services review.

Keeping your sitemap up to date

A sitemap that does not reflect the current state of your site is less useful than one that does. If you are using a CMS plugin, updates should happen automatically. If you are using a manually created or tool-generated sitemap, it needs to be regenerated and resubmitted whenever significant changes are made to your site’s structure or content.

During a website migration in particular, ensuring the new sitemap is in place and submitted before or immediately at launch is a critical step. It is one of the items on every migration checklist I use with clients, precisely because it directly affects how quickly Google discovers and begins indexing the new site.

A small file with a large impact

An XML sitemap is one of the more straightforward elements of technical SEO, but it is also one that is easy to get wrong or neglect. Done properly, it gives Google a clear, accurate picture of the content you want indexed and helps ensure your most important pages are not missed.

If you want to make sure your sitemap is correctly configured, or you are looking for broader support with your site’s technical foundations, get in touch with the team at TAL. We can audit what is in place, identify any issues and put a plan together that gives your content the best chance of being found.

All Articles

We’d love to chat

The best ideas start with a good old conversation. Let’s have a chat about how we can help you.

Complete the form and one of the directors will be in touch.

Or just pick up the phone and call us, we’re on 03334049888.





    Awards & Accreditations

    rar recommended
    Prolific North Finalist TAL Agency
    PRmoment awards finalist logo
    google analytics
    Google Shopping Logo
    google adwords
    bing partner
    manchester digital