WordPress XML Sitemap: pages to include and exclude

Light nodes and web panels converge on a central hub, whilst some pages remain separate.
Rate this post

A sitemap full of useless URLs does not improve SEO. In fact, it has the opposite effect: it makes it less clear which pages on the site deserve attention.

The WordPress XML sitemap It should contain the URLs you want to appear in search results, not everything that exists in the database. For a corporate website, choosing carefully what to include is part of technical SEO, alongside canonical tags, robots.txt, redirects and internal links.

Let’s look at how to build a clean, useful sitemap that is consistent with the website’s business objectives.

What is a WordPress XML sitemap and why is it important?

An XML sitemap is a technical file that lists a website’s URLs and helps crawlers discover them. Google describes it as a map that provides information about the pages and other files published on the domain, including videos and images where applicable.

This is not a guarantee of indexing. A page may be included in the sitemap but still not appear on Google if it has poor content, is a duplicate, has an incorrect canonical tag or is inaccessible.

The sitemap highlights the important pages

Think of the sitemap as a priority list. You’re telling Googlebot: “These URLs are public, up to date and of value to anyone searching for my services or content”.

For an SME, these might include the services pages, the portfolio, well-curated blog categories, informative articles and local pages. A good Guide to XML sitemaps explains the relationship between this file, scanning and indexing.

A sitemap is no substitute for a good navigation structure. If an important page does not receive any internal links, it remains weak even if it appears in the XML file.

Where can I find it on WordPress?

WordPress has generated a native XML sitemap since version 5.5. On self-hosted WordPress sites, the base URL is usually /wp-sitemap.xml.

The documentation on the Sitemap system introduced in WordPress 5.5 confirms that the core creates sitemaps for public content, taxonomies, author archives and the homepage. WordPress.com, on the other hand, documents access via /sitemap.xml, so do not confuse the two contexts.

A monitor displaying a sitemap diagram and linked pages against a dark background.

WordPress XML Sitemap: Which Pages to Include

The rule of thumb is simple: only include canonical, public, useful URLs that are genuinely intended for organic search. If you wouldn’t want a page to appear on Google, it probably shouldn’t be in the sitemap.

Services pages, local pages and contact details

A page detailing an actual service must be included. For example: website development, SEO consultancy, WooCommerce e-commerce, WordPress maintenance or Google Ads campaigns.

The same applies to useful local pages, such as a page dedicated to Rome or a province where you actually operate. They must have their own content, real-life examples and a clear proposition. A page with just two lines of text and a city name in the title adds no value.

The contact page can also be included, provided it is a comprehensive public page containing contact details, the company’s address, a contact form and useful information for customers.

Articles, categories and resources that answer questions

Blog posts should be included if they are up to date, easy to read and relevant to your audience. An in-depth article on website costs, choosing WordPress or SEO optimisation can capture genuine search queries and generate leads over time.

Categories should only be included in the sitemap if they function as genuine editorial pages. A category containing ten relevant articles, an introduction and useful links may be indexable. An empty or disorganised category is not.

To work out whether the URLs are supporting the indexing of the company website, always check that they can be accessed via the main navigation or contextual links.

Products and e-commerce pages available

For a WooCommerce e-commerce site, include products that can be purchased, well-structured categories and brand pages where these contain unique content. Each URL must return a 200 status code, have a correct canonical tag and provide relevant information.

A discontinued product may remain online if it generates traffic, has backlinks or has a suitable alternative. In that case, consider setting up a 301 redirect to the replacement product or a relevant category page. Do not redirect everything to the homepage.

Pages to exclude from the XML sitemap

The sitemap is not a complete list of the site’s pages. Technical pages, duplicate pages or those that are of no use for search purposes should be excluded. This check is even more important after years of changes, installed plugins and sections left half-finished.

Login, shopping basket, checkout and members’ area

Exclude login pages, password recovery pages, the customer area, the shopping basket, the checkout and order confirmation pages. These are necessary for the website to function, but do not appear in Google search results.

The same applies to dashboards, private pages, password-protected content and URLs that are only visible after logging in. Google states that a sitemap must be accessible to the crawler, without any authentication barriers. There is no point in including URLs that a general user cannot access.

Redirects, errors and URLs with parameters

A URL with a 301 or 302 redirect must not appear in the sitemap. Enter the final destination directly, provided it is relevant and indexable.

Also exclude 404 pages and URLs containing tracking parameters such as ?utm_source=, faceted navigation filters and combinations generated by internal searches. These are often duplicates or near-duplicates.

During a revamp, the Migration of a corporate website and XML sitemap They need to be managed together. First, map the old and new URLs; then, set up the redirects; finally, submit the updated sitemap.

Empty tags, attachments and worthless archives

WordPress can create archives by tag, author, date and attachments. These aren’t necessarily a bad thing, but they do require careful consideration.

An author archive makes sense on a magazine with multiple contributors. On a company website with just one author, it often results in a partial copy of the articles. Empty tags or tags used only once are of no use to anyone.

Attached pages should almost always be excluded. If an image is important, it should form part of a useful page or article, not exist as an isolated URL with no text.

A magnifying glass on a sitemap with highlighted pages and shaded sheets.

Noindex, canonical and robots.txt: they are not the same thing

These three elements are often treated as synonyms. They are not, and incorrect configuration can result in inconsistent signals.

Managing pages with the 'noindex' tag

The tag noindex Instructs search engines not to display a page in their results. It is used for technical pages, low-quality archives, temporary content or sections with no organic value.

In practice, a page marked as ‘noindex’ should not be included in the XML sitemap. This avoids conflicting messages and keeps the file tidier.

Do check, however, why the ‘noindex’ tag has been applied. If it concerns a service page, an important category or an article that should be driving traffic, don’t just remove it from the sitemap. Fix the problem at its root.

Canonical tags and robots.txt serve different purposes

The canonical tag specifies which is the main version when similar URLs exist. The sitemap must include that version, not copies with filters, parameters or alternative paths.

The robots.txt file can specify the path to the sitemap and control certain crawling areas. However, it is not a tool for ensuring that a page is de-indexed. For a proper configuration, check Sitemap and robots.txt for indexing as part of the same technical inspection.

Native sitemap, SEO plugins and Google Search Console

For a small showcase website, WordPress’s built-in sitemap may be sufficient. For a project involving a blog, WooCommerce, numerous categories or editorial requirements, an SEO plugin allows for more precise management.

Choose just one management system

Yoast SEO and Rank Math are two popular plugins for managing titles, meta tags and sitemaps. The important thing is to avoid duplication.

Do not have the core sitemap, an SEO plugin’s sitemap and another plugin’s sitemap active at the same time. This risks creating duplicate files, inconsistent URLs or unnecessary alerts in Search Console.

A website featuring a blog, image gallery and video content can use separate sitemaps organised under a main index. This is a useful solution when there is a large amount of content of varying types.

Send the file and check for errors

Google allows you to submit your sitemap via the dedicated report in Search Console, provided you have owner permissions for the property. The official procedure for submitting a sitemap It also explains how to specify this in the robots.txt file.

Once you’ve submitted the data, don’t just look at the “Successful” status. Check the excluded URLs, read errors, pages not found, and any discrepancies between the submitted URLs and the indexed pages.

Checks following publication, redesign or updates

The sitemap needs to be updated whenever the website changes. New pages, removed products, updated articles, deleted categories and migrations all alter the map of important URLs.

Before going live, use a checklist: check for status code 200, canonical tags, noindex tags, redirects, URLs in the menu, robots.txt and the sitemap. You can follow these steps in the guide to check the sitemap before publication.

After a redesign, submit the new sitemap and monitor 404 errors. 301 redirects must link each old URL to the equivalent new page. Ongoing technical management helps to monitor sitemaps and indexing, without realising there are problems once the traffic has already eased off.

Key points to remember

ContentsXML Sitemap
Full service pages and local pagesInclude
Up-to-date articles and well-curated categoriesInclude
Products available with a canonical URLInclude
Login, shopping basket and checkoutExclude
Redirects, 404 errors and URLs with parametersExclude
Empty tags, attachments and thin archivesExclude

The best sitemap is selective. It doesn’t need to be large; it must be consistent with the website you want to rank.

Frequently Asked Questions

Which pages should I include in my WordPress XML sitemap?

Include public, canonical and indexable pages that offer value to users and search engines. Suitable examples include service pages, up-to-date articles, well-curated categories, available products and comprehensive local pages.

Should ‘noindex’ pages be included in the sitemap?

No. A page with the tag noindex It shouldn’t appear in the sitemap, because you don’t want it to show up in search results. If you’ve applied the ‘noindex’ tag to an important page, check first that this is the right decision.

Where do I submit my WordPress XML sitemap?

Submit the sitemap URL in the Sitemap report in Google Search Console. You can also specify its path in the file robots.txt, so that web crawlers can find it more easily.

A clean sitemap boosts the website’s SEO

Your WordPress XML sitemap should reflect the true value of your site. Public, complete, canonical and useful URLs should be included. Technical, duplicate, redirected or low-quality pages should be excluded.

If the XML file contains the correct pages, Google gets a clearer picture. And your website starts off on a more organised technical footing, ready for visibility, traffic and enquiries.

Categories

Latest articles

WordPress white screen
WordPress white screen: how to regain access
A laptop displays a loading icon next to an external hard drive.
Error 413 in WordPress: how to resolve upload issues
A laptop with a neat project folder, a notebook, samples and an orange object on the desk.
WordPress custom fields for services and projects
A laptop with index cards arranged on the desk next to an orange notebook.
Custom post types in WordPress: when to use them in a business
Powered by Joinchat