Most sitemap advice is about getting pages in. The quieter half of the job is keeping the wrong ones out. A sitemap is a list you hand to search engines saying: these are the pages that matter, please find them. Every entry that contradicts that message, a URL that redirects elsewhere, a page marked noindex, a duplicate of a page already listed, dilutes the list and wastes the attention it was meant to focus.

This guide works through the exclusions that Ovatly's sitemap tooling is built around, using the free XML Sitemap Generator: redirects, noindexed pages, duplicates and non-canonical addresses, plus the one exclusion the tool enforces for you, lines that are not complete URLs. The size side of the same file is covered in Sitemap Size Limits: 50,000 URLs and 50 MB Explained.

Contents

  • Quick answer
  • The one rule that decides most cases
  • Redirects: list the destination, not the detour
  • Noindexed pages: two signals that cancel out
  • Duplicates and non-canonical versions
  • Lines that are not URLs at all
  • How to prune a list with the generator, step by step
  • Worked example: cleaning a small list
  • Limitations and honest expectations
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Your sitemap should list the canonical, indexable pages you want search engines to find. Leave out redirects, noindexed pages and duplicates. When you build the file with the XML Sitemap Generator, one more category removes itself: any line that is not a complete absolute URL starting with http:// or https:// is reported and skipped, so the file stays valid.

The one rule that decides most cases

The generator's own guidance is a single sentence: list the canonical, indexable pages you want search engines to find. Each word does work. Canonical means the one address you want treated as the page, not its variants. Indexable means the page is allowed to appear in search results. And "you want search engines to find" means the page earns its place; the sitemap is a discovery hint, not a full inventory of everything your site can serve.

Run any doubtful URL through that sentence. If it fails any part of it, it does not belong in the file.

Redirects: list the destination, not the detour

A redirecting URL is an address that sends visitors and crawlers onward to a different address. Listing it asks a search engine to find a page that, by your own configuration, is not there. The engine will follow the redirect and land on the destination, which is the page you actually want found.

So the fix is simple: wherever an old address redirects to a current one, list the current one, in its canonical form, and drop the old one. This comes up most after a redesign or a change of URL structure, when a sitemap regenerated from an old export still carries the previous addresses.

Noindexed pages: two signals that cancel out

A noindex instruction tells search engines to keep a page out of their index. A sitemap entry tells them the page is worth finding. A page carrying both is sending opposite instructions, and the noindex is the one that governs indexing.

Pages are often noindexed on purpose: thin utility pages, internal results, or anything you deliberately keep out of search. Those decisions may be right, but they settle the sitemap question too. If a page should not be indexed, it should not be listed. And if you find a page that is both listed and noindexed, treat it as a flag to check which of the two signals was the mistake.

Duplicates and non-canonical versions

Many sites can serve the same page at more than one address: with and without a trailing slash, through a print or filtered view, or under an older address that still resolves. Listing every version spreads the entries across copies of one page.

List the canonical version only: the single address you want search engines to treat as the page. Leave the other versions out. The same applies to near-duplicates, such as two pages published with the same content under slightly different addresses; choose the one that should be found and list that one.

Lines that are not URLs at all

One exclusion is mechanical rather than editorial. Sitemap entries must be full absolute URLs. When you paste a list into the generator, a line like "example.com/about", without the protocol, is reported and skipped, as are relative paths. The entry in the worked example below shows this happening.

This is protective behaviour. A file containing malformed entries can be rejected or partly ignored, so the tool excludes the bad lines and tells you, instead of writing them into the file and letting the whole sitemap suffer for a few typos.

How to prune a list with the generator, step by step

  1. Start from your full list of candidate URLs, one per line, and remove the redirects, noindexed pages and duplicates before you paste, keeping only the canonical address of each page.
  2. Open the XML Sitemap Generator and paste the pruned list, one full URL per line, including https://.
  3. Optionally choose a change frequency, a priority and a last-modified date to apply to every URL.
  4. Check the skipped-lines report if any URL was rejected, and fix the line rather than forcing it in: it was skipped because it is not a complete absolute URL.
  5. Copy or download the generated sitemap.xml and upload it to your site root.

Worked example: cleaning a small list

Imagine a short list for a two-page site, pasted with change frequency "weekly" and priority "0.8" selected. The good lines are "https://example.com/" and "https://example.com/about". The output is a <urlset> where each page appears as a <url> block with its <loc> plus the chosen <changefreq> and <priority> values.

Now picture the same paste with three extra lines: an old address that redirects to the about page, a duplicate of the homepage under a variant address, and the line "example.com/about" typed without the protocol. The pruning rule removes the first two before pasting: the redirect is replaced by its destination, which is already listed, and the duplicate gives way to the canonical homepage. The third line is caught by the tool itself and reported as skipped, because sitemap entries must be full absolute URLs. What reaches the file is the two pages the site actually wants found, which is the entire point.

Limitations and honest expectations

Be clear about what the tool does and does not check. The generator enforces form: it validates that each line is a complete absolute URL, escapes special characters automatically (for example & becomes &amp;), and reports what it skipped. It does not fetch your pages, so it cannot tell you that a listed URL redirects, is noindexed, or duplicates another page. That judgement is yours, made with the rule in this guide.

And keep the role of the file itself in proportion. The sitemap is a discovery hint, not a guarantee of indexing, and a sitemap does not improve rankings. A clean list helps search engines find the right pages; what those pages then earn depends on the pages themselves. More guides on keeping the file valid are in the SEO Tools guides.

Common mistakes

  • Listing every URL the site can serve. The sitemap is a shortlist of pages you want found, not an inventory.
  • Leaving redirects in after a redesign. Replace each redirecting address with its destination, in canonical form.
  • Listing noindexed pages. The two signals contradict each other; the sitemap entry is the one to remove.
  • Listing several versions of one page. Pick the canonical address and list only that.
  • Forcing in a skipped line. A skipped line was not a complete absolute URL. Fix the line; do not paste around the check.

FAQs

Should every page be in the sitemap? List the canonical, indexable pages you want search engines to find. Leave out redirects, noindexed pages and duplicates; the sitemap is a discovery hint, not a guarantee of indexing.

Should I list a URL that redirects? No. Leave redirects out and list the destination URL instead, in its canonical form. A sitemap entry is meant to name a page search engines should find and index, and a redirecting address is not that page.

Should noindexed pages be in the sitemap? No. A noindex instruction tells search engines not to index the page, while a sitemap entry asks them to find it. Listing a noindexed page sends both signals at once, so leave it out.

What about duplicate or near-duplicate pages? Leave duplicates out and list only the canonical version of the page, the one address you want search engines to treat as the page. The other versions add entries without adding anything findable.

Why was one of my URLs skipped? Entries must be complete absolute URLs starting with http:// or https://. Relative paths and bare domains without a protocol are reported and excluded so the file stays valid.

Conclusion

A good sitemap is short on purpose: the canonical, indexable pages you want search engines to find, and nothing that contradicts that. Prune redirects, noindexed pages and duplicates before you build, let the XML Sitemap Generator catch the malformed lines, and the file you publish will say exactly what you mean it to say.