☎ (435) 212-3354 Book a Call

XML Sitemaps for Law Firms: Complete Setup & Optimization Guide






XML Sitemaps for Law Firms: Complete Setup & Optimization Guide

XML Sitemaps for Law Firms: Complete Setup & Optimization Guide

Your law firm website has 200+ pages. Your homepage links to 8 practice area pages. Those link to 15 location pages. Those link to 40 attorney bios. Those link to 100+ blog posts.

Google’s crawlers can navigate some of these links naturally. But some pages—especially deep location pages and older blog archives—might not get discovered for weeks or months.

That’s what XML sitemaps solve. A sitemap is a file that lists every page you want Google to index. It tells Google “here are all my important pages, go index them.”

In this guide, you’ll learn what XML sitemaps are, exactly which pages to include, how to generate one for your law firm site, how to submit it to Google Search Console, and how to fix common sitemap errors.

What Are XML Sitemaps and Why Do Law Firms Need Them?

An XML sitemap is a machine-readable file (sitemap.xml) that lists all the pages on your website. Google crawlers read this file to discover pages they might otherwise miss.

Think of it like this: Your website is a library. The internal links are the signs pointing customers to different sections. The XML sitemap is a printed directory of every book in the library. Even if the signs are incomplete, customers can use the directory to find what they need.

Why law firms especially need XML sitemaps:

  • Complex site architecture: Law firm sites often have many layers—practice areas, locations, attorney bios, client resources. It’s easy for deep pages to go undiscovered.
  • Location pages: A firm with 10 office locations might have 100+ location-specific pages (one for each office/practice area combination). These often have weak internal linking, making them hard to discover.
  • Blog archives: Your blog posts from 2019 and 2020 may not be linked from anywhere. Without a sitemap, they could be overlooked by Google crawlers.
  • URL parameters: Some law firm sites use URLs like yoursite.com/practice-area/?office=dallas. Google treats these as separate pages. A sitemap ensures all variations are indexed.
  • Priority signaling: A sitemap lets you tell Google which pages are most important (your homepage, main practice areas) versus less important (author archive pages, older blog posts).

How XML Sitemaps Work

Google crawlers fetch your sitemap.xml file regularly (usually daily or weekly). They parse the file and queue each page for crawling and indexing. If a page is new or updated, Google prioritizes it. If a page was removed from the sitemap, Google eventually removes it from the index.

The workflow:

  1. Your website generates or updates sitemap.xml
  2. You submit the sitemap to Google Search Console
  3. Google crawlers fetch the sitemap every few days
  4. Google crawls pages listed in the sitemap (prioritized by your settings)
  5. Pages are indexed and included in search results

How often Google checks your sitemap: This depends on how frequently you update your site. If your site changes daily (frequent blog posts), Google crawls the sitemap daily. If your site rarely changes, Google checks it weekly or less often.

What to Include in a Law Firm XML Sitemap

Not everything on your website should go in a sitemap. Include only pages you want indexed by Google and want to rank in search results.

INCLUDE these pages:

  • Homepage: yoursite.com/
  • Practice area pages: yoursite.com/personal-injury/, yoursite.com/bankruptcy/, etc.
  • Location pages: yoursite.com/locations/dallas/, yoursite.com/locations/houston/, etc.
  • Sub-pages: yoursite.com/practice-areas/personal-injury/car-accidents/, etc.
  • Attorney bio pages: yoursite.com/attorneys/john-smith/
  • Blog posts: yoursite.com/blog/how-to-file-for-bankruptcy/
  • Resource pages: yoursite.com/guides/bankruptcy-guide.pdf (linked as a page)
  • Client testimonials page: yoursite.com/client-reviews/ (if it’s its own page)
  • Contact page: yoursite.com/contact/
  • FAQ pages: yoursite.com/faq/ (if separate from practice areas)

DO NOT INCLUDE these pages:

  • Paginated archive pages: yoursite.com/blog/page/2/, yoursite.com/blog/page/3/ — include only page 1
  • Thank-you pages: yoursite.com/thank-you/, yoursite.com/form-submitted/ — these aren’t meant for search traffic
  • Admin/backend pages: yoursite.com/admin/, yoursite.com/wp-admin/ — these should never be indexed
  • Duplicate content: If you have multiple URLs for the same content (with/without trailing slash, www vs. non-www), only include the canonical version
  • Tag archive pages: yoursite.com/tag/bankruptcy/ — too many low-value pages
  • PDF files directly: Only include PDFs if they’re valuable standalone resources (not downloadable blog attachments)
  • Search result pages: yoursite.com/search/?q=bankruptcy — never index your own search results
  • Password-protected pages: If content is behind a login, don’t include it in the sitemap

How to Generate an XML Sitemap for a Law Firm WordPress Site

If your law firm website runs on WordPress (which most do), you can generate a sitemap automatically using the Rank Math plugin. Rank Math is the SEO plugin TheSEOForLawFirms.com uses and recommends for law firm sites.

Step-by-step:

  1. Install Rank Math: Go to WordPress dashboard > Plugins > Add New. Search “Rank Math.” Click Install and Activate.
  2. Set up Rank Math: Follow the setup wizard. Click “Setup Wizard” and complete the configuration.
  3. Go to Sitemap Settings: Rank Math > General Settings > Sitemap. You’ll see that sitemaps are already enabled.
  4. View your sitemap: Go to yoursite.com/sitemap_index.xml. Rank Math generates a sitemap index that links to specific sitemaps (posts, pages, users, categories).
  5. Configure what’s included: In Rank Math Settings > Sitemap, toggle on/off which post types to include. For law firms, you typically want:
    • Posts (blog): ON
    • Pages: ON
    • CPT (custom post types like attorney profiles): ON
    • Users (attorney bios if they’re user profiles): ON or OFF depending on structure
    • Categories/Taxonomies: ON for practice areas, OFF for tags
  6. Set priority and frequency: You can set default priority (0.0-1.0) for each post type. Set homepage to 1.0, practice areas to 0.9, blog posts to 0.6.
  7. Exclude pages: If you have pages that shouldn’t be indexed, exclude them here (thank-you pages, archives, etc.)

For non-WordPress sites: Use a sitemap generator tool. Search “free xml sitemap generator” and use tools like XML-Sitemaps.com. Upload your site URL and generate the sitemap. Download and manually add it to your server.

How to Submit Your Sitemap to Google Search Console

Once you have a sitemap, you need to tell Google about it.

Step-by-step:

  1. Go to Google Search Console: search.google.com/search-console
  2. Select your property: Click the correct website property (yoursite.com)
  3. Go to Sitemaps: In the left menu, click Sitemaps
  4. Submit your sitemap: Click “Add/test sitemap” and enter the sitemap URL. For Rank Math, this is yoursite.com/sitemap_index.xml
  5. Click Submit: Google will fetch and parse your sitemap
  6. Check status: It takes a few hours to a day for Google to fully process your sitemap. Check the status in the Sitemaps section. You should see the number of pages submitted and indexed.

What to expect: Rank Math sitemaps are typically very clean. Most pages should be indexed within 48 hours. You should see a message like “Submitted 247 URLs, 243 indexed.” A few pages not indexed is normal (duplicate pages, noindex tags, etc.).

Sitemap Size Limits and Splitting Large Sitemaps

Google enforces a hard limit: each sitemap file can contain a maximum of 50,000 URLs. Most law firm sites never hit this limit.

Example: A law firm with 10 offices, 50 attorneys, 500 blog posts, and 100 service pages would have roughly 1,000 URLs total. Well under the limit.

When you might hit the limit:

  • Very large national firms with 50+ office locations and 100+ attorneys
  • Firms with 5,000+ blog posts (rare, but it happens)
  • Firms that publish enormous amounts of content daily

If you exceed 50,000 URLs, use a sitemap index file (which Rank Math handles automatically). The index file contains links to multiple sitemaps, each with up to 50,000 URLs. This is transparent to Google—they process the index and all child sitemaps.

Image Sitemaps and Video Sitemaps

Beyond text pages, you can create specialized sitemaps for images and videos. This helps Google discover multimedia content.

Image Sitemaps: Include photos of your law firm, your attorneys, your office. This ensures Google can find and index these images for image search results. If someone searches “DUI lawyer Dallas” in Google Images, your attorney photos could appear.

How to add image sitemaps: In Rank Math > General Settings > Sitemap, enable “Include images in sitemap.” Rank Math automatically extracts images from all pages and includes them.

Video Sitemaps: If your practice area pages or blog posts include embedded videos (like a partner explaining bankruptcy law), you can add video sitemaps. This is optional for most law firms but can boost visibility if you publish video content regularly.

How Often Google Recrawls Your Sitemap

The frequency varies based on your site’s change frequency.

Daily publishing (frequent blog posts): Google crawls your sitemap daily. New blog posts appear in search results within 24-48 hours.

Weekly publishing: Google crawls your sitemap 2-3 times per week. New pages appear within 3-5 days.

Monthly or infrequent publishing: Google crawls less often (once a week or less). New pages may take 1-2 weeks to index.

To speed this up: Submit individual URLs to Google Search Console. When you publish a new blog post or practice area page, use “Inspect URL” in GSC and click “Request indexing.” This tells Google to crawl the page immediately.

Fixing Sitemap Errors in Google Search Console

Sometimes Google reports errors in your sitemap. Here’s how to fix the most common ones:

Error: “Submitted URL marked ‘noindex'”

You included a page in your sitemap, but Google can’t index it because it has a noindex meta tag.

Fix: Remove the page from your sitemap (exclude it in Rank Math settings) OR remove the noindex tag from the page.

Error: “Submitted URL does not have a valid permalink structure”

The URL in your sitemap is malformed or doesn’t actually exist.

Fix: Check the URL in Rank Math settings. Ensure your WordPress site has a proper permalink structure (Settings > Permalinks > Post Name).

Error: “Submitted URL returns a redirect””

The page URL in your sitemap redirects to another page (301 redirect). While Google will follow the redirect, it’s cleaner to use the final destination URL in your sitemap.

Fix: Update the sitemap to point to the final destination URL. In Rank Math, enable “Exclude pages with redirects.”

Error: “Submitted URL returns a 404 or 500”

The page in your sitemap no longer exists or is temporarily down.

Fix: Remove the page (it’s probably already gone). If temporarily down, restore the page or remove from sitemap.

News Sitemaps (For Firms Publishing Legal News)

If your law firm blog publishes frequent legal news or case analysis, you can create a news sitemap. This tells Google “these are recent news articles worth indexing quickly.”

Benefits: Articles may appear in Google News results and rank for breaking legal stories within hours instead of days.

Requirements:

  • Articles must be less than 2 days old
  • Articles must be original content (not copied from elsewhere)
  • Site must have “news” reputation in Google News Index

How to enable: Rank Math doesn’t automatically generate news sitemaps. Use the Yoast SEO News extension or manually create a news sitemap using Google’s News Sitemap documentation.

Best Practices for Law Firm Sitemaps

1. Keep your sitemap lean: Include only pages worth indexing. Don’t include 10 variations of every page. Choose one canonical URL per piece of content.

2. Set priority correctly: Homepage should be highest priority (1.0), main practice areas (0.9), location pages (0.8), blog posts (0.6). Don’t set everything to 1.0—it defeats the purpose.

3. Update when you publish: Every new blog post or practice area page should be in your sitemap within 24 hours. Rank Math handles this automatically.

4. Remove outdated pages: If you delete a page from your website, remove it from the sitemap. Don’t let dead links accumulate.

5. Monitor your sitemap in GSC: Check the Sitemaps report monthly. Look for increases in “submitted” vs. “indexed” pages. If the gap widens, investigate why pages aren’t being indexed.

6. Use proper URLs: Ensure all URLs in your sitemap are absolute (http://yoursite.com/page) not relative (/page). Rank Math handles this automatically.

The Bottom Line

XML sitemaps are essential for law firm websites with more than 50 pages. They ensure Google discovers and indexes your practice areas, location pages, attorney bios, and blog posts quickly and efficiently.

If you haven’t set up a sitemap yet, do it today. For WordPress sites, install Rank Math and enable sitemaps. Submit your sitemap to Google Search Console. Monitor the status monthly. It takes 15 minutes and can directly improve your indexation and rankings.

Sitemaps don’t rank your pages for you, but they ensure Google can find them. And if Google can’t find your content, it can’t rank it.