A sitemap for any site, including one built by hand

Last updated

The short answer

A sitemap is a file listing the pages you want search engines to find. Most site builders make one for you at /sitemap.xml. If your site was built by hand, nothing makes it: write a short XML file listing your real pages, put it in the site's top folder, name it in robots.txt and submit it in Google Search Console.

What a sitemap is

A plain XML file, defined by the sitemap protocol, with one <url> entry per page and its full address in <loc>. It can also carry a <lastmod> date for when the page last changed.

What it doesn't do: Google says a sitemap is a hint, not a guarantee that the pages will be crawled or indexed. Google uses <lastmod> only when it is consistently accurate, and ignores <priority> and <changefreq>.

Why it matters to a small business

Search engines find most pages by following links. A small site with clear menus may be found without a sitemap, but a sitemap removes the guesswork: a new service page, or one linked only from a footer, is on the list from the day you add it. It is also where Search Console reports which listed pages made it into Google and which didn't, and why.

How the free scan decides

A footer link called "Sitemap" that opens a page of links is helpful to visitors, but it is not the XML file search engines read.

Where builders put yours

Writing one by hand

For a site written in HTML, PHP or ASP.NET with no plugin to do it, the file is short enough to write yourself:

  1. List the pages a visitor should be able to land on from a search: the homepage, each service or product page, about, contact. Leave out baskets, account pages, search results, thank-you pages and anything marked noindex.
  2. Use each page's one proper address, the one in its canonical tag: https://, your chosen www form, no redirect in between (the one-address guide explains why).
  3. Save the list as sitemap.xml, in UTF-8, in the same folder as your homepage. On Windows hosting (IIS) that is the folder with web.config in it.
  4. Add <lastmod> only if you will keep it true: the date you last really changed that page's content, not today's date on each entry.
  5. Open https://yoursite.com/sitemap.xml in a browser and check it shows the list, not your "page not found" page.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.yoursite.com/</loc>
  </url>
  <url>
    <loc>https://www.yoursite.com/services/</loc>
    <lastmod>2026-09-30</lastmod>
  </url>
  <url>
    <loc>https://www.yoursite.com/contact/</loc>
  </url>
</urlset>

One file holds up to 50,000 addresses, far more than a small site needs. When you add or remove a page, update the file at the same time, so it never sends search engines to a page that has gone. When the free scan finds a hand-built site with no sitemap, the finding includes a starting file listing the pages the scan reached, to check and save.

Telling Google about it

  1. Add one line to your robots.txt, with the full address: Sitemap: https://www.yoursite.com/sitemap.xml. Search engines read robots.txt before they crawl, so this is where they find the sitemap.
  2. Add your site to Google Search Console and verify it. The Domain option, with a TXT record where your domain's DNS is managed, covers each form of your address at once; Google's verification help lists the other ways. Leave the record in place: Google checks it again later.
  3. In Search Console, open Sitemaps, enter the sitemap's address and submit it.

How to check yours

The free robots.txt checker shows whether your robots.txt names a sitemap. The free scan goes further: it opens the sitemap, requests a sample of the pages in it and lists any that fail or are marked noindex. In Search Console, the Sitemaps report shows how many listed pages Google has found.

Checklist

What the free scan checks for this

These are the FocalScore checks that cover this guide's subject. Each one in your report says what it found, shows the evidence and gives the fix.

Sources

Last checked . Documentation, settings and rules change; if one of these pages now says something different, it is right and this guide is out of date. Tell us at info@focalscore.com.

  1. Google Search Central: Build and submit a sitemap
  2. sitemaps.org: The sitemap protocol
  3. Google Search Central: Introduction to robots.txt
  4. Google Search Console
  5. Search Console Help: Verify your site ownership