Spunk Autos

Websites and web tools

Spring Sitemap Generation and Clean-Up

An XML sitemap lists the URLs you want search engines to find. Over a winter it collects old promotion pages, sold vehicles and redirected service URLs. This spring routine rebuilds the sitemap so it lists only live, useful pages, and explains the limits that matter for larger inventory sites.

What a sitemap must contain

Each entry needs a loc element with the full URL, including https://. The lastmod element is optional but useful when it is accurate. The priority and changefreq elements are part of the protocol, but Google has said it ignores them, so do not spend time tuning them.

Limits to know

LimitValueWhat to do if you exceed it
URLs per sitemap file50,000Split into several files and list them in a sitemap index
File size, uncompressed50 MBSplit the file; gzip compression helps transfer but the limit applies to the uncompressed size
URL hostSame host as the sitemap location, unless you verify cross-site ownershipKeep one sitemap per host

The spring clean-up steps

  1. Export the URLs currently in your sitemap.
  2. Check every URL's status code with a link checker or crawler.
  3. Remove any URL that returns a redirect, a 404 or a 410.
  4. Remove URLs that carry a noindex tag or a canonical pointing elsewhere.
  5. Remove expired promotion pages, or redirect them to the current offer and drop them from the sitemap.
  6. For dealers, confirm sold vehicles leave the sitemap when they leave the inventory.
  7. Regenerate the file and validate it against the sitemap schema.
  8. Resubmit it in your search console account and watch for errors.

Honest lastmod dates

Some generators stamp every URL with today's date on each build. That teaches search engines that your lastmod values mean nothing. Set lastmod only when the main content of the page changes, such as new prices or new service details, not when a footer year changes.

Where the sitemap should live

Place it at the site root, for example /sitemap.xml, and add a line to robots.txt that reads Sitemap: followed by the full URL. If you use a sitemap index, point to the index file and let it list the others.

Generator choices

  • CMS built-in or plugin generators update automatically but may include tag pages, author pages and attachment pages you do not want listed.
  • Static site generators can produce the sitemap at build time from the page list, which keeps it accurate.
  • Crawler-based generators find what is linked, so they miss orphan pages and can include pages you meant to hide.
  • Hand-written sitemaps suit very small sites but go stale fast.

Whichever method you use, open the finished file and read a sample of the URLs. A two-minute look often catches staging addresses or test pages that no automated step flagged.