If you build or maintain websites for law firms, there is a quiet problem worth checking on every project. A charge page can look perfect in a browser and still be close to empty for some of the crawlers that feed AI assistants. When the page's main text arrives only after JavaScript runs, a crawler that doesn't run JavaScript sees the shell and little else.
For a criminal defense firm, that matters. People increasingly ask ChatGPT, Claude and Perplexity who handles DUI or assault cases in their county, and those tools draw on what their crawlers and search partners were able to read. This post covers how to test what those crawlers receive and how to fix the common causes on law firm sites.
What we know about AI crawlers and rendering
Googlebot renders JavaScript, with a delay, and has for years. Many other crawlers do not. In late 2024 Vercel published an analysis of crawler traffic across its network reporting that the crawlers run by OpenAI and Anthropic fetched JavaScript files but did not execute them. Crawler behavior can change, and each company documents its own bots, so check current documentation before assuming. The safe working assumption is that any important text should exist in the initial HTML response.
Which crawlers a firm should allow is a separate decision with its own tradeoffs, covered in which AI crawlers a criminal defense website should let in. This post assumes you've made that call and want the allowed crawlers to see real content.
Test the raw HTML
The fastest check needs no special tooling. Request the page without a browser and look for a sentence you know appears in the body copy.
curl -s https://example-firm.com/dui-defense/ | grep -c "blood alcohol" A count of zero means the phrase is not in the server response. Repeat for the headings, the FAQ answers and the lawyer's name. You can also view the source in a browser (not the inspector, which shows the rendered DOM) and search for the same text.
Run this on a sample of page types: the homepage, a charge page, a lawyer bio, a location page and the contact page. Page builders and themes often treat each type differently.
Common causes on law firm sites
Most law firm sites are built on a CMS or a page builder, not a hand-rolled single-page app, but client-side rendering still sneaks in. The usual suspects:
- FAQ sections built as accordions that load their content from a script or an API call after the page loads.
- Tabs on charge pages where only the first tab exists in the HTML.
- Practice area grids populated by a script from a JSON file.
- Headless setups where the front end is a client-rendered framework without server rendering turned on.
- Review widgets and attorney bios injected by third-party embeds.
Accordions themselves are fine. The problem is when the hidden content isn't in the markup at all. An accordion built with the details and summary elements, or with content present in the HTML and toggled by CSS or a small script, passes the test.
Fixes that tend to work
For headless builds, turn on server-side rendering or static generation for content pages. Most modern frameworks support it, and charge pages rarely need anything that only works on the client.
For CMS sites, replace script-loaded components with ones that output their content in the HTML. If a plugin loads FAQ answers by AJAX, swap it or move the content into the page body. For third-party review embeds, consider publishing a small number of approved reviews directly in the HTML, following the bar's rules and the review platform's terms.
Keep structured data in the initial HTML as well. JSON-LD injected by a tag manager may be read by Google after rendering but not by crawlers that skip scripts.
Check after every release
Rendering problems tend to come back when someone installs a new plugin or switches a theme. Add the curl check to whatever release process you have. A short script that fetches a list of key URLs and greps for an expected phrase on each one is enough to catch regressions before they sit unnoticed for months.
Log results with the date and the deploy that preceded them, so you can match a drop in AI referrals or crawler visits to a specific change.
Questions developers ask about AI crawlers
Does Google's rendering mean we can ignore this?
Not if the firm cares about AI assistants beyond Google. Server-rendered content also helps users on slow phones, which is common for people searching after an arrest.
Is dynamic rendering for bots a good fix?
It adds complexity and risks serving different content to bots and users. Server-side or static rendering for everyone is simpler and easier to maintain.
What about content behind a click-to-load button?
If the text isn't in the initial HTML, assume script-skipping crawlers won't see it. Put essential answers in the markup.
For more on AI search and the technology behind legal marketing, see the guides on ChatGPT, AI search and legal marketing technology.
SBD Marketing works only with criminal defense firms, one per city, and helps with website design, SEO for the charges a firm defends, visibility in AI search tools and SEO audits.
