A criminal defense website can have strong charge pages, good reviews and a well-run Google Business Profile, and still struggle in search because of problems nobody can see from the front end. A stray tag in the page header, a menu built the wrong way or a redesign that broke old URLs can quietly hold back every page on the site.
This guide covers seven coding mistakes we see again and again on defense firm websites. You don’t need to be a developer to spot most of them. Each section explains what the mistake is, why it hurts rankings for searches like “DUI lawyer” or “assault attorney,” and how to check your own site with free tools such as Google Search Console and PageSpeed Insights.
The seven mistakes
- A noindex tag or robots.txt rule left over from development
- Menus and links that only work with JavaScript
- Heavy themes, scripts and images that fail Core Web Vitals
- A mobile layout that hides content or the phone number
- Missing redirects after a redesign
- Duplicate location pages and wrong canonical tags
- Missing or outdated structured data
1. A noindex tag or robots.txt rule left over from development
Developers often block search engines while a new site is being built, so half-finished pages don’t show up in Google. The two usual tools are a robots meta tag set to “noindex” on every page, and a robots.txt file with a rule that disallows the whole site. If either one survives the launch, Google is told not to index the site or not to crawl it.
This happens more often than you’d think, especially on WordPress, where a single setting in the reading options asks search engines not to index the site. A firm can spend months wondering why its new website isn’t ranking when the cause is one checkbox.
How to check: in Google Search Console, open the Pages report and look for pages listed as “Excluded by ‘noindex’ tag” or “Blocked by robots.txt.” You can also visit yourdomain.com/robots.txt in a browser. If it says “Disallow: /” under “User-agent: *”, the whole site is blocked from crawling.
2. Menus and links that only work with JavaScript
Google can render JavaScript, but it finds new pages mainly by following links. Google’s guidance is that a link should be an HTML anchor element with an href attribute pointing to a real URL. Menus built from buttons or other elements that run a script when clicked, with no href, may look fine to a visitor and still leave Google without a path to your charge pages.
The same problem shows up with practice area tabs, accordions and “load more” buttons. If your list of charges only appears after someone clicks a tab, and the tab content is fetched by a script, those charges may be hard for Google to discover or connect to the rest of the site.
How to check: use the URL Inspection tool in Search Console on a page with your main menu and view the rendered HTML. Search the code for your charge page URLs. Each one should appear inside a normal link. A crawler tool such as Screaming Frog, which has a free version for small sites, will also show which pages it can reach by following links.

3. Heavy themes, scripts and images that fail Core Web Vitals
Core Web Vitals are Google’s measures of real-world page experience. Largest Contentful Paint (LCP) measures how fast the main content appears, and Google’s “good” threshold is 2.5 seconds or less. Interaction to Next Paint (INP), which took the place of First Input Delay in the Core Web Vitals in March 2024, measures how quickly the page responds to taps and clicks, with 200 milliseconds or less counted as good. Cumulative Layout Shift (CLS) measures how much the layout jumps while loading, and the good threshold is 0.1 or less.
Defense firm sites tend to fail for the same handful of reasons:
- A full-screen hero video or an uncompressed photo above the fold
- Page builders that load large CSS and JavaScript files on every page
- Live chat, call tracking, review widgets and several analytics tags all loading at once
- Web fonts loaded from several sources
- Images without set dimensions, which push text around as they load
How to check: run your home page and your top charge pages through PageSpeed Insights. Look first at the field data at the top, which comes from real Chrome users, and then at the lab diagnostics below it. The Core Web Vitals report in Search Console groups your URLs by status, so you can see whether the problem is site-wide or limited to one template.
4. A mobile layout that hides content or the phone number
Google now indexes the web using its smartphone crawler. That means the mobile version of your page is the version Google evaluates. If your mobile layout hides parts of a charge page, drops the attorney bio or removes internal links to save space, Google may not see that content at all.
Mobile coding mistakes also cost calls directly. Common ones include a phone number that’s plain text instead of a tap-to-call link, a sticky header that covers half the screen, buttons too small or too close together to tap, and pop-ups that block the page as soon as it loads.
How to check: open each important page on your own phone and compare it with the desktop version. Every heading, paragraph and link on desktop should exist on mobile too, even if it’s styled differently. Make sure the phone number uses a “tel:” link.

5. Missing redirects after a redesign
Redesigns often change URLs. A page that lived at /practice-areas/dui/ becomes /dui-defense/, or a firm switches from one domain to another after a name change. If the old URLs aren’t permanently redirected to the new ones, every link and bookmark pointing to the old address hits a 404 error, and the ranking history attached to those pages is lost.
The usual fix is a 301 redirect from each old URL to the closest matching new page. Avoid sending every old URL to the home page, which Google may treat much like a 404. Avoid chains where one redirect points to another, which slow down both visitors and crawlers.
How to check: before any redesign, export a full list of your current URLs from Search Console or a crawler. After launch, test each one and confirm it lands on the right new page in one step. The Pages report in Search Console will show new “Not found (404)” errors in the weeks after a launch.
6. Duplicate location pages and wrong canonical tags
Many defense firm sites have dozens of city pages that are identical apart from the city name. Google’s spam policies describe this pattern under doorway abuse, and pages like these rarely rank. Even when it doesn’t trigger a problem, Google tends to pick one version and ignore the rest.
Canonical tags add a second layer of trouble. A canonical tag tells Google which URL is the main version of a page. Themes and plugins sometimes set every page’s canonical to the home page, or point the HTTPS version of a page at the HTTP version, or leave a staging domain in the tag after launch. Any of these can stop the right page from ranking.
How to check: use URL Inspection in Search Console on a few charge and city pages. It shows the canonical you declared and the canonical Google selected. If they differ, find out why. For city pages, make sure each one has real local information, such as the courthouse address and local procedure, or consider combining them.
7. Missing or outdated structured data
Structured data is code, usually in JSON-LD format, that describes your firm in a way search engines can read. For a defense firm, the most useful type is LegalService from schema.org, which can hold your firm name, address, phone number, hours, logo and the areas you serve. Schema.org marks the older Attorney type as deprecated and suggests LegalService instead.
Two common mistakes: markup with an old address or phone number that no longer matches your Google Business Profile, and markup added in the hope of a rich result Google no longer shows. In August 2023 Google announced that FAQ rich results would be shown mainly for well-known government and health websites. FAQ markup won’t hurt a law firm site, but it shouldn’t be the reason you add a FAQ section. Write FAQs because they answer real questions.
How to check: run a page through Google’s Rich Results Test or the Schema Markup Validator and compare every detail in the markup with your Business Profile.
Questions about technical SEO for defense firms
How often should a defense firm check for these problems?
Look at Search Console at least once a month and run a full crawl every quarter. Always check after a redesign, a theme change, a new plugin or a hosting move, since that’s when most of these problems appear.
Can my web developer fix these, or do I need an SEO specialist?
A good developer can fix all seven once they know about them. The harder part is noticing them in the first place, which is where a technical SEO audit helps.
Will fixing technical problems alone get my firm ranked?
Fixing them removes obstacles. Rankings still depend on useful charge pages, a strong Google Business Profile, reviews and links. Technical work makes sure that effort isn’t wasted.
Is a WordPress site worse for SEO than a custom-built site?
No. Google doesn’t favor one platform. What matters is how the site is built and maintained: lean themes, few plugins, fast hosting and the checks described above.
This guide is part of SBD Marketing’s series on technical SEO for defense firms. SBD Marketing works only with criminal defense law firms, building fast websites and running SEO audits that find problems like these.
SBD Marketing · info@sbdmarketing.agency · Book a call: sbdmarketing.agency/scheduling · Serving criminal defense law firms across the USA · sbdmarketing.agency

Leave a Reply