[object Object]

← back to Ventura Claw Leads

Per-vertical SEO meta uses real total + city names; visible count shows truth

c64097d6b857ef5b575403ea2985c636f9940df5 · 2026-05-07 10:00:56 -0700 · Steve Abrams

The find route was using businesses.length for both meta description and
the on-page count, but that's capped by LIMIT 200 — beauty's meta said
'200 beauty businesses' when actual total is 636. Now compute the
unfiltered total and top-3 cities once per request and use them in:
- meta description: '636 beauty businesses on Ventura Blvd in Woodland
  Hills, Sherman Oaks, Encino. ...'
- visible page header: 'Showing 200 of 636 businesses' when capped,
  '56 businesses found' when not.

Two extra COUNT/GROUP BY queries per /find hit, both indexed.
Distinct meta per vertical lets each /find?vertical=X URL rank
independently for '<vertical> <city>' searches in Google.

Files touched

Diff

commit c64097d6b857ef5b575403ea2985c636f9940df5
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu May 7 10:00:56 2026 -0700

    Per-vertical SEO meta uses real total + city names; visible count shows truth
    
    The find route was using businesses.length for both meta description and
    the on-page count, but that's capped by LIMIT 200 — beauty's meta said
    '200 beauty businesses' when actual total is 636. Now compute the
    unfiltered total and top-3 cities once per request and use them in:
    - meta description: '636 beauty businesses on Ventura Blvd in Woodland
      Hills, Sherman Oaks, Encino. ...'
    - visible page header: 'Showing 200 of 636 businesses' when capped,
      '56 businesses found' when not.
    
    Two extra COUNT/GROUP BY queries per /find hit, both indexed.
    Distinct meta per vertical lets each /find?vertical=X URL rank
    independently for '<vertical> <city>' searches in Google.
---
 routes/public.js      | 24 +++++++++++++++++++++---
 views/public/find.ejs |  8 +++++++-
 2 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/routes/public.js b/routes/public.js
index bf6cbaf..59c4d94 100644
--- a/routes/public.js
+++ b/routes/public.js
@@ -103,15 +103,33 @@ router.get('/find', async (req, res, next) => {
     // Per-vertical custom title + H1 = real SEO value. Each vertical filter is
     // a distinct landing page in Google's eyes — 8 vertical-specific URLs that
     // can rank for "[vertical] sherman oaks" / "studio city [vertical]" etc.
+    // Pull the unfiltered total + per-city distribution so the meta description
+    // reflects the real directory size (not the page LIMIT) and includes city
+    // names — Google rewards meta descriptions with concrete entity names.
+    const totalForFilter = await db.one(
+      `SELECT COUNT(*)::int AS n FROM businesses WHERE ${where.join(' AND ')}`,
+      params
+    );
+    const cityRows = await db.many(
+      `SELECT city, COUNT(*)::int AS n
+         FROM businesses
+        WHERE ${where.join(' AND ')}
+        GROUP BY city ORDER BY n DESC LIMIT 5`,
+      params
+    );
+    const totalCount = totalForFilter?.n ?? businesses.length;
+    const topCities = cityRows.map(c => c.city).filter(Boolean);
+
     const verticalLabel = v && BY_KEY[v] ? BY_KEY[v].label : null;
     const cityLabel = city || null;
     const titlePartsList = [verticalLabel, cityLabel ? 'in ' + cityLabel : null].filter(Boolean);
     const customTitle = titlePartsList.length
       ? `${titlePartsList.join(' ')} on Ventura Blvd · Ventura Claw`
       : 'Find a business — Ventura Claw';
+    const cityListing = topCities.length ? ` in ${topCities.slice(0, 3).join(', ')}` : '';
     const customMeta = titlePartsList.length
-      ? `${businesses.length} ${verticalLabel ? verticalLabel.toLowerCase() : 'local'} businesses on Ventura Blvd${cityLabel ? ' in ' + cityLabel : ''}. Search by name or message a business directly — Ventura Claw routes leads with no markup.`
-      : `Browse ${businesses.length} local businesses on Ventura Blvd.${v ? ' Filtered by ' + (BY_KEY[v]?.label || v) + '.' : ''}`;
+      ? `${totalCount} ${verticalLabel ? verticalLabel.toLowerCase() : 'local'} businesses on Ventura Blvd${cityLabel ? ' in ' + cityLabel : cityListing}. Search by name or message a business directly — Ventura Claw routes leads with no markup.`
+      : `Browse ${totalCount} local businesses on Ventura Blvd${cityListing}.${v ? ' Filtered by ' + (BY_KEY[v]?.label || v) + '.' : ''}`;
     const customH1 = titlePartsList.length
       ? `${titlePartsList.join(' ')} on Ventura Blvd`
       : 'Search Ventura Blvd';
@@ -119,7 +137,7 @@ router.get('/find', async (req, res, next) => {
     res.render('public/find', {
       title: customTitle,
       metaDescription: customMeta,
-      businesses, q, v, city, verticals: VERTICALS,
+      businesses, totalCount, q, v, city, verticals: VERTICALS,
       sort: orderClauses[sortKey] ? sortKey : 'featured',
       customH1, verticalLabel
     });
diff --git a/views/public/find.ejs b/views/public/find.ejs
index c57cb5a..62d353b 100644
--- a/views/public/find.ejs
+++ b/views/public/find.ejs
@@ -48,7 +48,13 @@
   </form>
 
   <div class="grid-controls" role="region" aria-label="Sort and density">
-    <p class="muted" style="margin: 0"><%= businesses.length %> business<%= businesses.length === 1 ? '' : 'es' %> found</p>
+    <p class="muted" style="margin: 0">
+      <% if (typeof totalCount !== 'undefined' && totalCount > businesses.length) { %>
+        Showing <%= businesses.length %> of <%= totalCount %> business<%= totalCount === 1 ? '' : 'es' %>
+      <% } else { %>
+        <%= businesses.length %> business<%= businesses.length === 1 ? '' : 'es' %> found
+      <% } %>
+    </p>
     <div class="grid-controls-right">
       <label class="grid-control"><span>Sort</span>
         <select id="grid-sort">

← 1acea14 Add scripts/dedupe-corridor-shells.sql + hide 119 noisy seed  ·  back to Ventura Claw Leads  ·  Add pagination to /find — page=N param + Prev/Next nav 3f90e3f →