Article

How to Create a Sitemap.xml

A sitemap.xml file gives search engines a cleaner list of URLs that matter on your site. It does not replace internal linking, but it helps discovery and makes important pages easier to find and recrawl.

In this article

What a sitemap is for

A sitemap.xml file is a machine-readable list of URLs that you want crawlers to know about. It is especially useful for newer sites, larger sites, tool directories and any project where not every page is easy to discover through navigation alone.

A sitemap is not a quality shortcut. It will not rescue weak pages. What it does well is point crawlers toward the pages that matter and help you keep that list structured.

  • Useful for tool sites with many utility pages
  • Helpful after publishing new guides and sections
  • Worth updating after URL changes

What should go inside

Include the pages that you genuinely want discovered and indexed. Leave out URLs that are thin, redirected, blocked, duplicate or intentionally excluded. A sitemap should be selective enough to be meaningful, not just exhaustive by default.

On a small site, the homepage, tool pages, article pages and category hubs are usually the main candidates. Legal pages can be included, but they are rarely the most important entries.

Optional fields that help

Fields like lastmod, changefreq and priority can be useful, but only if you can keep them realistic. If you cannot maintain them, a plain list of important URLs is often better than boilerplate values that say very little.

For many smaller projects, a clean sitemap with only URL entries is already a strong start.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/slug-generator</loc>
    <lastmod>2026-03-16</lastmod>
  </url>
</urlset>

Common mistakes

One common mistake is dumping every URL variation into the file, including parameter URLs, redirects and pages that are canonicalised away. Another is forgetting to refresh the sitemap after a redesign changes the URL structure.

Even on a small site, it pays to keep the file tidy instead of treating it like a junk drawer.

  • Avoid duplicate URL variants
  • Avoid redirected pages
  • Refresh the file after migrations and restructures

How to generate and upload one

List the pages that matter, generate the XML, save the result as sitemap.xml and upload it to the site root. Then reference it from robots.txt and, if relevant, submit it in webmaster tools.

The matching tool on DevToolDino makes that process faster because you can paste URLs, preview the XML and download the final file directly.

What should and should not go into a sitemap

A sitemap works best when it contains canonical, indexable URLs that you actually want crawled and evaluated. Thin utility pages, duplicate filtered URLs and staging paths do not belong there.

For most sites, quality matters more than stuffing every possible URL into the file. A tighter sitemap is easier to maintain and gives search engines a cleaner list of pages that matter.

  • Include canonical URLs
  • Leave out redirects and noindex pages
  • Keep the sitemap current when pages are added or removed

Examples for blogs, company sites and shops

A company site often has a relatively small sitemap with service pages, case studies, contact pages and a guide hub. A blog usually includes category pages and articles, while an ecommerce site may need separate product, category and image sitemaps once the site grows.

That is why one sitemap format is not enough as guidance. The file should mirror the structure of the site you actually run.

  • Small brochure site: one sitemap is often enough
  • Content site: include articles and core category pages
  • Store: split large sections before the file becomes unwieldy

A practical checklist you can use right away

If you want the shortest path from theory to action, turn the advice in this guide into a small checklist you can repeat on every page or project. That is usually the difference between understanding an idea once and using it consistently.

A useful checklist should be short enough to follow and specific enough to catch mistakes. In practice, that means listing the decisions that matter most, reviewing a real example, then applying the same sequence the next time you touch the same type of task.

For most site owners, repeatable process beats perfect memory. The more technical or repetitive the task is, the more valuable that becomes.

  • Review the current setup before changing anything
  • Make one clear draft instead of stacking half-finished edits
  • Check the result on the live site after publishing

Examples that show the idea in context

Examples matter because abstract advice can sound obvious until you have to apply it to a real page. A blog article, a store category, a tool landing page and a documentation page often need slightly different decisions even when the overall principle stays the same.

That is why it helps to compare at least two or three realistic scenarios whenever you implement the ideas from this guide. The principle stays stable, but the execution changes depending on the page type and the goal.

When in doubt, work from the actual page purpose first. The right implementation nearly always becomes clearer once the page job is obvious.

How this connects to the rest of your site

No technical or editorial choice exists on its own. Slugs affect canonicals, canonicals affect sitemaps, sitemaps interact with crawl signals, and content quality affects whether a page deserves stronger technical support in the first place.

That is why the best improvements usually come from looking at the surrounding system, not only the one field or file directly in front of you. Good site maintenance is rarely one grand fix. It is a collection of aligned decisions.

Use the matching tools to speed up the mechanical work, but keep the bigger picture in mind while you do it.

Common mistakes to watch for

Most mistakes happen when people rush a task, copy a setup from a very different website or forget that a small change can affect several systems at once. That is why plain-language review matters just as much as the original implementation.

Another common mistake is never revisiting a decision after launch. Even good technical setups drift over time as a site grows, templates change and old assumptions stop being true.

The best long-term maintenance habit is simple: review important settings when the site structure changes, not only when something breaks.

A final takeaway

The details in this guide matter because they influence how cleanly a site communicates with users, crawlers and browsers. None of them need to be dramatic to be useful. In most cases, steady, clear implementation wins.

If you use the matching tool as a starting point, keep the human review step. Automation is great for speed, but quality still comes from choosing the version that fits your actual website.

That combination of practical tools and deliberate review is usually what produces the strongest long-term result.

A practical checklist you can use right away

If you want the shortest path from theory to action, turn the advice in this guide into a small checklist you can repeat on every page or project. That is usually the difference between understanding an idea once and using it consistently.

A useful checklist should be short enough to follow and specific enough to catch mistakes. In practice, that means listing the decisions that matter most, reviewing a real example, then applying the same sequence the next time you touch the same type of task.

For most site owners, repeatable process beats perfect memory. The more technical or repetitive the task is, the more valuable that becomes.

  • Review the current setup before changing anything
  • Make one clear draft instead of stacking half-finished edits
  • Check the result on the live site after publishing

Examples that show the idea in context

Examples matter because abstract advice can sound obvious until you have to apply it to a real page. A blog article, a store category, a tool landing page and a documentation page often need slightly different decisions even when the overall principle stays the same.

That is why it helps to compare at least two or three realistic scenarios whenever you implement the ideas from this guide. The principle stays stable, but the execution changes depending on the page type and the goal.

When in doubt, work from the actual page purpose first. The right implementation nearly always becomes clearer once the page job is obvious.

How this connects to the rest of your site

No technical or editorial choice exists on its own. Slugs affect canonicals, canonicals affect sitemaps, sitemaps interact with crawl signals, and content quality affects whether a page deserves stronger technical support in the first place.

That is why the best improvements usually come from looking at the surrounding system, not only the one field or file directly in front of you. Good site maintenance is rarely one grand fix. It is a collection of aligned decisions.

Use the matching tools to speed up the mechanical work, but keep the bigger picture in mind while you do it.

Common mistakes to watch for

Most mistakes happen when people rush a task, copy a setup from a very different website or forget that a small change can affect several systems at once. That is why plain-language review matters just as much as the original implementation.

Another common mistake is never revisiting a decision after launch. Even good technical setups drift over time as a site grows, templates change and old assumptions stop being true.

The best long-term maintenance habit is simple: review important settings when the site structure changes, not only when something breaks.

A final takeaway

The details in this guide matter because they influence how cleanly a site communicates with users, crawlers and browsers. None of them need to be dramatic to be useful. In most cases, steady, clear implementation wins.

If you use the matching tool as a starting point, keep the human review step. Automation is great for speed, but quality still comes from choosing the version that fits your actual website.

That combination of practical tools and deliberate review is usually what produces the strongest long-term result.

A practical checklist you can use right away

If you want the shortest path from theory to action, turn the advice in this guide into a small checklist you can repeat on every page or project. That is usually the difference between understanding an idea once and using it consistently.

A useful checklist should be short enough to follow and specific enough to catch mistakes. In practice, that means listing the decisions that matter most, reviewing a real example, then applying the same sequence the next time you touch the same type of task.

For most site owners, repeatable process beats perfect memory. The more technical or repetitive the task is, the more valuable that becomes.

  • Review the current setup before changing anything
  • Make one clear draft instead of stacking half-finished edits
  • Check the result on the live site after publishing

Use the matching tools

When you are ready to move from reading to doing, these tools help you apply the ideas from the guide without leaving the workflow.

Keep reading

These related guides cover the surrounding questions people usually run into next, so you can keep the technical pieces connected instead of solving them one by one in isolation.