Splitting a Law Firm Sitemap by Page Type to Debug Indexing
A typical criminal defense firm site has a few hundred URLs: practice pages for each charge, city and courthouse pages, attorney bios and a blog that has grown for years. Most CMS plugins put all of them into a single si
A typical criminal defense firm site has a few hundred URLs: practice pages for each charge, city and courthouse pages, attorney bios and a blog that has grown for years. Most CMS plugins put all of them into a single sitemap file. That works for discovery, but it throws away information you need later, when the firm asks why its new assault page is not showing up in Google.
Splitting the sitemap by page type is a small change that pays off every time someone has to debug indexing. Search Console reports coverage per submitted sitemap, so separate files let you see at a glance whether charge pages are indexed at a healthy rate while thin city pages are being ignored.
What Google does and does not use from a sitemap
Before changing anything, it helps to know which parts of the sitemap protocol matter. Google's documentation says a single sitemap file can hold up to 50,000 URLs or 50 MB uncompressed, and larger sites should use a sitemap index that points to several files. A law firm site will never hit those limits, so the reason to split is diagnostics, not size.
Google has said it ignores the priority and changefreq values. It does use lastmod, but only when the dates are consistently accurate. A plugin that stamps every URL with today's date on every build teaches Google to ignore your lastmod values entirely. If you cannot produce real modification dates, leave the field out.
Choose the groups
Split along the lines the firm actually cares about. For a defense site, a good starting set is:
- Charge and practice area pages
- Location pages for cities, counties and courthouses
- Attorney and staff bios
- Blog posts and news
- Utility pages such as contact, about and reviews
Keep the groups stable. If a URL moves between files every build, the per-sitemap numbers in Search Console become hard to compare over time. Most CMSs can classify pages by template or content type, which is a more reliable signal than URL patterns.
Build a sitemap index
The index file lists each child sitemap. Serve it at a predictable path and reference it from robots.txt.
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://example-defense.com/sitemaps/charges.xml</loc></sitemap>
<sitemap><loc>https://example-defense.com/sitemaps/locations.xml</loc></sitemap>
<sitemap><loc>https://example-defense.com/sitemaps/attorneys.xml</loc></sitemap>
<sitemap><loc>https://example-defense.com/sitemaps/blog.xml</loc></sitemap>
</sitemapindex>
Each child file follows the normal urlset format. Include only canonical, indexable URLs that return 200. Leave out redirects, pages carrying a noindex tag, paginated archives and filtered views. A sitemap that lists URLs you do not want indexed sends Google a contradictory signal and fills your reports with noise.
Generate it from the same source as the pages
The safest setup builds the sitemaps from the same data that renders the pages. In a static site generator, loop over the content collections at build time. In WordPress or another CMS, use the content type and the page's robots setting, so a page that an editor marks noindex drops out of the sitemap automatically.
Pull lastmod from the content's real update timestamp, not the deploy time. If the firm edits a footer that appears on every page, that change probably should not bump lastmod for all three hundred URLs.
Add a check to CI that fetches each URL in the generated sitemaps and fails the build if any of them redirect, return an error or contain a noindex directive. On a site this size, the check runs in seconds and catches the mistakes that usually go unnoticed for months.
Submit and read the reports
In Search Console, submit the index file under Sitemaps. Google will list each child sitemap with the number of discovered URLs. Then open the Page indexing report and use the sitemap filter to view one group at a time.
This is where the split earns its keep. If charge pages show nearly all URLs indexed but location pages show half of them under "Crawled - currently not indexed," you have a content problem in one template, not a technical problem across the site. The guide to finding and fixing indexing problems on a defense firm website walks through what each of those statuses usually means on a law firm site and which fixes to try first.
Check the reports monthly and after any release that touches templates or routing.
Common mistakes on law firm sites
A few patterns turn up again and again:
- Staging or preview URLs leaking into the production sitemap
- Old practice areas the firm dropped still listed after the pages were redirected
- Both trailing-slash and non-slash versions of the same URL
- HTTP URLs left over from before the site moved to HTTPS
- Attorney bios for lawyers who left the firm years ago
Each one is minor on its own. Together they make the reports hard to trust, which defeats the point.
Questions about law firm sitemaps
Does splitting the sitemap improve rankings?
No. It improves your ability to see what Google is doing with each kind of page, which helps you find and fix the problems that do affect rankings.
Should images and videos get their own sitemaps?
Only if the firm relies on image or video search. Most defense sites can skip them.
How do I tell Google about a new sitemap?
Submit it in Search Console and list it in robots.txt with a Sitemap line. Google will also find it through the index file.
More notes on technical SEO for law firm sites are on the code and technical SEO site.
SBD Marketing works only with criminal defense law firms, one firm per city, and helps them with website design, SEO for the charges they defend, visibility in AI search tools and SEO audits.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.