Skip to content

Keyword Clustering: How to Group Keywords by Search Intent

Learn to cluster keywords by shared search intent, set overlap thresholds, map clusters to URLs, and prevent cannibalization with a step-by-step method.

Search result cards group into stacks that point to distinct pages.How-to

Keyword clustering groups keywords with the same search intent so one page can serve them. To build a cluster:

  1. List the keywords you want to group.
  2. Compare the top 10 organic results for each pair. Start with four shared URLs as your cutoff.
  3. Check borderline groups by hand to see whether one page can answer both searches.
  4. Pick a primary keyword and assign the group to one existing or planned page.

What is keyword clustering?

Keyword clustering is grouping keywords that share one search intent onto one page. You measure shared intent by what Google returns: when two queries produce largely the same top-10 organic URLs, Google already treats them as one need, and one page should serve both.

A concrete pair comes from Bharath Ravishankar's Search Engine Land keyword page analysis. "invoice software for small businesses" and "invoicing software for freelancers" shared seven of their top 10 URLs, and he recommends one page for both. A strategist would write the cluster like this:

  • Primary keyword: "invoice software for small businesses" takes the title tag and H1.
  • Secondary keywords: "invoicing software for freelancers" gets an H2 with a section on freelancer billing, since it names a distinct sub-audience, while its close wording variant "invoice software for freelancers" needs no separate heading.

Assigned URL: /invoicing-software, entered once in the content plan as either an existing page to expand or a new page to write.

The cluster is the unit of planning from here on. Briefs and rewrites, including cannibalization checks, all key off the cluster and its single URL rather than off individual keywords.

Why intent is the grouping test

Two queries that resolve to the same user need belong on one URL regardless of wording, and two queries with different needs belong on separate URLs even when they share most of their words. Google's SEO Starter Guide states that its language matching systems "can understand how your page relates to many queries, even if you don't explicitly use the exact terms in them," using "charcuterie" and "cheese board" as terms that may lead to the same content. A separate page per phrasing does nothing Google can't already do, and it splits links and engagement signals such as clicks that would have accrued to one page.

Several outcomes follow for a B2B SaaS content program. One page carries the whole cluster, which is how a single guide ends up ranking for a long tail of variants it never targeted individually. John Shehata's 100-article consolidation cohort reported search traffic up 210% and keyword coverage up 900% after merging underperforming articles into stronger ones, though that project combined merging, redirects, and content expansion, so treat the figure as directional. Thin pages disappear from the plan because a variant with no distinct intent never earns its own row, while clusters with no assigned URL become your gap list. Every cluster that maps to nothing is a page you don't have yet, which is the core of a content gap analysis.

How to cluster keywords: step by step

The workflow takes a keyword export, fetches each keyword's SERP once, counts shared URLs between every pair, groups pairs above a threshold into clusters, picks a primary per cluster, and assigns each cluster one URL in a spreadsheet that becomes the content plan. Expect to re-run it quarterly, because SERPs move.

Step 1: Build the keyword list

Start with seed terms for each product area and job-to-be-done, then widen with two sources. Competitor gaps come from a rank-tracking export (Ahrefs or Semrush, as examples of the method) filtered to terms competitors rank for and you don't. Search Console supplies the queries you already show for. The Search Analytics API returns your own property's queries, pages, clicks, impressions, CTR, and position with a rowLimit of 25,000 per request. Search Console retains 16 months of history. It won't return competitor SERPs, so it feeds the list rather than the clustering itself.

Export everything to one CSV with columns for keyword, monthly volume, difficulty, and source, and de-duplicate exact matches. Leave near-duplicates in. The analyst uses the clustering evidence to decide whether they belong together.

Step 2: Group by SERP overlap or semantic similarity

SERP-overlap clustering fetches the top 10 organic URLs for each keyword and groups keywords whose result sets share more than a set number of URLs. It measures Google's observed ranking behavior, which is why it works for page-boundary decisions, and it costs one SERP fetch per keyword. It fails on zero-volume or brand-new keywords with no SERP to compare. Volatile SERPs can shift between runs, while thin SERPs may return the same results for different intents. Keyword Insights is one example of a tool built on this method; Python scripts in the manual section below do the same job.

Semantic clustering embeds the keyword text itself and groups by vector similarity. Lee Foot's Search Engine Journal semantic clustering walkthrough uses the all-MiniLM-L6-v2 sentence-transformer model, which catches synonyms like "bike" and "bicycle" that lexical matching misses and runs on very large lists with no SERP cost. Its weakness is that it can't see intent. "what is email marketing" and "email marketing software" sit close together in embedding space and serve completely different buyers.

The one head-to-head test located is Lena Kovac's clustering tools comparison on a 4,000-keyword export from a B2B SaaS client, scored against manual SERP verification. SERP-based clustering matched the manual result 87% of the time, compared with 71% for semantic-only methods. Combined methods reached 91%. The write-up doesn't disclose the thresholds or labeling protocol, so it's a practitioner test rather than an auditable study, but the ordering matches what most operators report.

For a B2B SaaS list in the low thousands, run SERP overlap directly. For a larger list, or one dominated by long-tail terms with no SERP data, use embeddings to form broad groups first, then validate any cluster headed for a commercial page against real SERP overlap before it enters the plan.

Step 3: Set your overlap threshold (soft, moderate, hard)

Four shared URLs out of the top 10 is the working default, with three for loose informational grouping and five or six for commercial pages. No published research validates any specific cutoff against ranking outcomes, so these are practitioner defaults, but they converge. Morteza Najafi's 2,000-keyword Oncrawl test recommends "4, 5, or 6," and ProgSEO's weekly clustering script runs at 4 of 10. Here's how the three settings behave:

More columns
SettingShared top-10 URLsUse it for
Soft3Educational and glossary content where Google shows more result diversity, and large lists where you'd rather over-merge than fragment
Moderate4The default for most B2B SaaS keyword sets
Hard5–6Comparison, alternative, and pricing pages, and any category where small intent differences change the buyer

The threshold sets your cluster count directly. Najafi's taxonomy: "A lower threshold (2–3) creates larger, more inclusive clusters. A medium threshold (4–6) requires that keywords have meaningful similarity to be grouped together. A higher threshold (7+) creates very strict, smaller clusters." ProgSEO describes both failure directions: set it to 7 of 10 and "you generate too many distinct, hyper-specific pages," which produces thin content and cannibalization; set it too low and "you end up smashing wildly distinct intents into monster pillar pages that never actually rank for anything specific."

An analyst has to fix two settings before the count means anything. Pull every SERP with the same device (desktop or mobile, never mixed in one run), the same country and language codes, and a city-level location rather than a bare country. Cluster each market separately; the Bobble study of 76,307 queries over nine months found 97.76% of queries produced at least one inconsistent organic result set across geographic locations. Count only organic URLs and ignore ads, featured snippets, People Also Ask, and knowledge panels, following the SE Ranking methodology. And don't compare your raw counts to another tool's without checking depth: Keyword Insights now uses a top-seven comparison because "Google no longer consistently shows 10 traditional links in the top 10 results," so its default of 3 is stricter than a 3 of 10.

Borderline pairs at 3–4 shared URLs need checks for intent category and volume ratio. Same intent category (both informational, both commercial) leans toward one cluster. A volume ratio of 10x or more means the bigger keyword likely deserves its own page. When in doubt, keep both in the same cluster and map them to one URL. If the volume ratio and intent evidence support separate posts, the analyst should split the pair into adjacent clusters so each post still maps to one URL. Even seven shared URLs, in Ravishankar's framing, "should trigger a closer review" alongside page type and content differences rather than an automatic merge.

Step 4: Pick the primary keyword and assign secondaries

The primary keyword is the highest-volume term in the cluster at a difficulty your domain can currently rank for. At seven or more shared URLs, the SE Ranking methodology takes the higher-volume keyword as primary. When the head term's difficulty is far beyond your reach, make the next-largest term primary and keep the head term as a secondary; the page still gets a shot at it as authority builds.

Secondaries go into H2s only when they name a distinct subtopic or sub-audience, the way "invoicing software for freelancers" earned its own section earlier. Word-order and singular/plural variants need no heading at all. Google's language matching covers those, and a page with an H2 for every variant reads like a keyword list to the buyer and to the rater. Record the primary and its secondaries in the cluster row so the brief carries them.

Step 5: Map each cluster to one URL

Add a target URL column and fill it for every cluster. Where a page already exists, the cluster becomes a rewrite or expansion. Where the cell is blank, it's a new page. The content team uses that spreadsheet as the content plan, with cluster ID, primary, secondaries, combined volume, page type, target URL, and parent pillar.

The strategist organizes clusters into pillars and spokes by volume and breadth. The head cluster (the broad, high-volume term with its close variants) becomes the pillar page, and each subtopic cluster becomes a spoke that links to the pillar and to sibling spokes with descriptive anchor text. The pillar and topic clusters guide covers the architecture; the strategist reviews the clustering output to decide which spokes exist and how many. HubSpot's original 2017 framework sized a pillar as "broad enough to be an umbrella for 20–30 posts," which is a reasonable check: a pillar with three spokes is probably a spoke itself.

Link structure does the work of signaling hierarchy. Google's ecommerce site structure documentation states it does not use URL structure to infer site hierarchy and that "the more links a page has to it within a site, the higher the relative importance of the page," so the spoke-to-pillar links in your internal linking strategy matter more than the folder path. Whether concentrated coverage produces what practitioners call topical authority is a hypothesis to test on your own site, as the topical authority framework lays out, rather than a documented ranking mechanism.

When to split a cluster instead of merging

Split a cluster when the SERP shows mixed result types or when the two keywords trigger different SERP features. A volume gap of roughly 10x is another split signal. An excessive difficulty gap warrants separate URLs when it accompanies different SERP competition or page types. If the intent and SERPs remain aligned, select an attainable primary as described in Step 4 rather than splitting on difficulty alone. CXL's guide to analyzing SERPs puts the mixed-intent case plainly: "If your SERP analysis returns a SERP with mixed intent, you probably haven't chosen a specific-enough target." A result page that's half blog posts and half software category pages is Google serving two audiences at once, and one page can't satisfy both. Feature differences count too. If keyword A triggers a featured snippet and keyword B triggers a video carousel, they likely need different content types even with moderate URL overlap. A final check comes from page length: if covering the whole cluster would need a 12,000-word page, the cluster is too broad.

Before the split, a team might hold one cluster labeled "email marketing" containing "what is email marketing," "email marketing definition," "email marketing software," and "best email marketing tools," all mapped to a single /email-marketing guide. The team's SERP review shows that the plan combines distinct needs. The definitional queries return long-form explainers; the software queries return comparison roundups and vendor pages.

After the split, there are two clusters and two URLs inside one topic cluster. /learn/what-is-email-marketing holds the definitional terms as a spoke. /email-marketing-software holds the commercial terms as a comparison page. Each links to the other, both link to the pillar, and the plan records the pair so nobody drafts a third page on either side.

A mixed email marketing cluster splits into a definition guide and a software comparison.
Split a cluster into two pages when the same wording represents two different search intents.

Ravishankar's three-condition test helps settle the remaining close calls. A strategist can justify a separate page when "Google treats the query separately. The proposed content can stand on its own. The website also has a clear place for the URL." The case for a separate page is strongest when all three conditions align. If fewer align, review the page type, content differences, and role of the proposed URL rather than applying a categorical rule.

Cluster keywords in a spreadsheet

For a short list, collect the top 10 organic URLs for each keyword by hand. For a longer list, use a SERP API to collect the same results and put them into a spreadsheet. Lay the sheet out with one row per keyword and these columns: keyword, volume, difficulty, source, URL 1 through URL 10 (top organic results), cluster ID, primary flag, and target URL. No source located demonstrates a pure Google Sheets formula (COUNTIF or ARRAYFORMULA) that computes shared ranking URLs between keywords, so in Sheets the SERP fetch and overlap count run in Apps Script against an external SERP API such as Serper.dev or DataForSEO. The Python version is simpler to maintain.

The Python recipe has five moves:

  • Fetch each keyword's SERP exactly once with fixed device, location, and language parameters. Cache the top 10 organic URLs so total fetches equal your keyword count rather than every pair.
  • For every keyword pair, count the URLs in common, or compute Jaccard similarity as common URLs divided by total unique URLs, times 100.
  • Create an edge between any two keywords at or above your threshold.
  • Run connected components over the graph so every linked keyword lands in one cluster.
  • Write the cluster ID back to the sheet.
Keyword clustering runs from one SERP fetch per keyword through eight steps to writing cluster IDs to the sheet.
The script fetches each SERP once, links keywords above the threshold, and writes cluster IDs back to the sheet.

Working implementations already exist. Lee Foot's SERP Clustering at Scale accepts a SERP-API CSV export or fetches live, offers connected-components, clique, and core-based grouping, and ships with a shared-URLs slider defaulting to 4. Najafi's Oncrawl article includes a Colab notebook that pulls SERPs through Serper.dev and groups at 4–6 common URLs. Use them as reference code and keep the threshold decision in your own hands.

The operational cost comes from maintaining connections among the tools. Keyword exports in Ahrefs or Semrush, SERP data in a Python cache, the cluster map in Sheets, briefs in a doc, and Search Console in its own tab, with a quarterly re-run that has to be reconciled against pages published since. In GrowthX OS, Content Clusters live in Context, Opportunities ranks new-page and rewrite work using cluster priority among its signals, and every dispatchable brief carries a primary keyword and search intent, with a human operator deciding which clusters get built. If maintaining this workflow across separate tools is the bottleneck, book a demo to see how the GrowthX platform runs it in one workspace.

Fixing keyword cannibalization with clusters

A team prevents cannibalization before publishing with one rule: no brief starts until a strategist looks up its primary keyword in the cluster map. If the keyword's cluster already has a target URL, the work is a rewrite or expansion of that URL, never a new page. If the keyword isn't in any cluster, fetch its SERP, run the overlap check against the nearest cluster's primary, and either add it as a secondary or open a new cluster row. Write the target URL into the brief so the writer and the reviewer both see which page owns the intent.

A cluster-map check leads to an existing target page or a comparison of search results for an unassigned keyword.
Check the map before briefing a page. Update the existing target when it serves the same intent.

After publishing, an analyst uses Search Console to check whether the map held. John Mueller's September 2025 answer on keyword cannibalization frames the diagnosis: "Search Console shows data for when pages were actually shown, it's not a theoretical measurement," and "If you have 3 different pages appearing in the same search result, that doesn't seem problematic to me just because it's 'more than 1'." Open Performance, then Search Results, filter by the cluster's primary query, and read the Pages column. The clearest problem signal is that your map assigns two or more URLs to the same intent, and both take impressions for one query over the same period. Other problem signals are:

  • The ranking URL flips between pages across weeks, so neither accumulates clicks.
  • Clicks or impressions drop on an established page shortly after a new page in the same cluster goes live.

If both pages earn clicks or conversions and serve different intents (a how-to guide and a comparison page, say), leave them alone and add an internal link between them.

At scale, the BigQuery bulk export beats the UI. Niko Alho's SQL for SEO query counts distinct URLs per query and surfaces the ones with more than one URL and meaningful impressions:

SELECT
  query,
  COUNT(DISTINCT url) AS url_count,
  SUM(impressions) AS total_impressions
FROM `your_project.dataset.gsc_bulk_export`
WHERE date >= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
GROUP BY query
HAVING url_count > 1 AND total_impressions > 1000
ORDER BY total_impressions DESC

The impression floor is a judgment call. Practitioner scripts use anything from 50 impressions per URL to 1,000 total; pick one that filters noise on your traffic level.

Repair depends on whether the competing pages share intent. When they do, consolidate into the URL with more links and clicks, merge the unique sections from the loser, and 301 the loser to the winner. Chris Long's three consolidation cases at Search Engine Land reported organic traffic up 200% after redirecting two identical pages and up 47% after canonicalizing two semantically similar ones, single-site cases from 2017 with no control group, so read them as the direction of the effect rather than its size. When the pages serve different intents, sharpen each page's angle, point internal anchors at the correct page for each query, and split the cluster in the map so the plan matches the site.

Then watch the query set. Ravishankar's post-publication test is that a standalone page "should begin attracting a recognizable query cluster" that stays on the new URL instead of switching between pages. Put the cannibalization query on a quarterly calendar alongside the clustering re-run, and treat any query that fails it as the first item in next quarter's rewrite queue.