How to Build a Sitemap for a Trades Website: Google’s Rules

How to Build a Sitemap for a Trades Website: Google’s Rules

A sitemap is a list of the pages you want Google to know about. Most trades sites get one from a plugin without anyone checking it. Google’s page on building sitemaps lists the real rules, and a few of them surprise people.

I am Robiul Alom Ronju, Founder of Nexranking. The rules are from Google Search Central. My checks for trades sites are marked as mine.

Sitemap: right format, canonical URLs only, accurate lastmod, submit it
Google’s sitemap rules. Built from Google Search Central.

Formats

Google has no preference. XML is the most versatile and can carry extra data for images, video, news and localised pages. RSS, mRSS and Atom are often easiest because a CMS generates them. A plain text file lists one URL per line. An HTML sitemap page helps visitors but cannot be submitted in Search Console.

Limits and location

  • 50MB uncompressed or 50,000 URLs per sitemap. Larger sites split into several, optionally with an index file.
  • UTF-8 encoding.
  • Place it at the site root if possible. A sitemap normally affects only URLs in its own directory and below.
  • Use fully qualified, absolute URLs. URL order does not matter.

What to include

Include only the canonical URLs you want to appear in search results. This is the rule plugins most often break. A sitemap full of redirected, noindexed or duplicate URLs sends mixed signals. See canonical URLs.

Priority, changefreq and lastmod

Google ignores priority and changefreq. It uses lastmod only if it is consistently and verifiably accurate, and it should reflect the last significant update, such as a change to main content, structured data or links. Changing only a copyright date does not count. If your plugin stamps every page with today’s date, Google may stop trusting the field.

Creating one

Use your CMS or a plugin, such as WordPress. For a few dozen URLs you can write one by hand. Larger sites should generate it automatically from their own data.

Submitting

  • Submit it in the Search Console Sitemaps report. It shows when Google fetched it and any errors.
  • Or add a Sitemap line to robots.txt.
  • The Search Console API is also available.
  • Google says submission is only a hint. It may not download the file or use it for crawling.

That is why a sitemap helps discovery but does not guarantee indexing. See the page indexing report.

A trades site checklist

These checks are my own.

  1. Open yoursite.co.uk/sitemap.xml and read it.
  2. Remove thank you pages, tag archives and other thin URLs from it.
  3. Confirm every URL returns 200 and is canonical.
  4. Check lastmod changes only when content changes.
  5. Submit it once and watch the report.

A worked example

A plumber with 40 pages uses a plugin that also lists 120 tag and author archive URLs. Those URLs are thin and often noindexed. Removing them leaves 40 canonical pages. The report in Search Console then tells a cleaner story, and any real problem is easier to spot because it is not buried among junk entries.

Mistakes I see

  • Sitemaps listing URLs that redirect or return 404.
  • Noindexed pages included in the file.
  • Every lastmod set to the build date.
  • Two sitemaps from two plugins that disagree.
  • Submitting an old sitemap after a redesign.

If you want me to read yours, ask for an audit.

How many URLs can a sitemap hold?

50,000 URLs or 50MB uncompressed.

Does Google use priority and changefreq?

No. Google ignores both.

When does Google use lastmod?

Only if it is consistently and verifiably accurate.

What URLs belong in a sitemap?

Only the canonical URLs you want to appear in search results.

Does a sitemap guarantee indexing?

No. Google says submission is only a hint.

Sources