Lead-to-Account Matching: Rules That Work in HubSpot and Beyond

Lead-to-account matching ties every new lead to the right company record. Here is the match ladder I use, the domain and name rules, the HubSpot settings and limits, and a scorecard to grade your match rate.

Pixel-art lead profile joined to a CRM board through a magnifier, a new lead matched to the right company record.

Lead-to-account matching links each new lead to the company record it belongs to, so it routes to the right owner and counts toward the right account. In HubSpot the default rule is simple: the email domain must equal the company domain name. Rules that work add a ladder on top: alias domains, enrichment, company name plus country, and a review queue.

Get this wrong and the damage is quiet. A VP at a target account fills in your demo form. The lead lands in round robin instead of with the AE who has worked that account for six months. Two reps email the same buyer. Your ABM report says the account went cold when it didn't.

This post is the full playbook. It covers what HubSpot does on its own and where domain matching breaks. Then it lays out the match ladder I use, the normalizer code, the hierarchy rules, the routing table and a worked example with real-looking numbers. It ends with a scorecard and a one-week plan.

Key takeaways

  • Domain first, never domain only. Exact domain catches most leads, but freemail, subdomains and alias domains need their own rules.
  • Use a ladder, not a single rule. Try matches from strongest to weakest and stop at the first confident hit.
  • Track false matches, not just match rate. A wrong match sends a buyer to the wrong rep, which is worse than no match.
  • Know HubSpot's defaults. Subdomains become separate companies, and API-created companies skip domain dedupe.
  • Route on the account, not the lead. Once matched, the account owner, open deals and tier decide who gets it.

What is lead-to-account matching?

Lead-to-account matching answers one question for every new lead: which company does this person work for, in our CRM? The answer drives three things.

First, lead routing. If the account has an owner, the lead should go to that owner. Second, scoring. A lead from a tier 1 account is worth more than the same title at a random company. Third, reporting. Account-based marketing only works if every touch rolls up to the account.

Here's what breaks when matching fails.

Failure What the buyer sees What it costs you
No match A stranger from your sales team Lead goes to round robin, owner never hears
Wrong match A rep who knows nothing about their company Wasted calls, a confused buyer, bad reports
Duplicate company Two reps emailing them Split history, double outreach, lost trust
Match to wrong level Parent owner and subsidiary owner both reach out Turf fights and a slow reply

Matching sits right before routing. If your lead routing rules look solid but leads still land with the wrong rep, the bug is usually here.

How is it different from identity resolution and deduplication?

These three get mixed up. Identity resolution figures out that two signals are the same person, like a form fill and a web visit. Deduplication makes sure each person and company exists once. Lead-to-account matching links a person to a company.

They depend on each other. If your company records are full of duplicates, matching has two right answers and picks one at random. Clean companies first. The CRM data hygiene guide covers the duplicate rules and the monthly job.

How does HubSpot match leads to accounts by default?

HubSpot has a setting called "Create and associate companies with contacts." Per HubSpot's automatic association docs, it matches the domain in a contact's email to the company domain name of a company. The setting is available on all plans.

Here's how it behaves in each case, from the same page.

Situation What HubSpot does
Email domain matches a company domain Associates the contact with that company
No company has that domain Creates a new company and fills it with HubSpot's data
Email is on a subdomain, like info.example.com Treats it as its own domain and creates a separate company
Free email, like Gmail or Yahoo Checks the contact's Website URL property instead
Free email and no website URL Makes no association
Two companies share the same domain Picks one, and you can't choose which
Contact already has a different company Leaves the existing association alone
Form includes company properties Associates with the company from the form

You can exclude up to 1,000 domains from automatic association. HubSpot also warns against turning this setting on if you run its Salesforce integration, because it can create duplicate companies.

What does the primary company control?

A contact can be linked to many companies, but one is the primary. Per HubSpot's associate records docs, the first company you link becomes the primary by default. Activities auto-associate only with the primary company. Lifecycle stage syncs update only the primary. Segments, workflows, cross-object reports and personalization tokens all read from it.

So a wrong primary company is a bigger deal than it looks. It points every workflow at the wrong account.

What about companies with more than one domain?

HubSpot lets you add extra domains to one company. Per its multiple domains docs, contacts with any of a company's domains get associated with that one company. You can add them in the record or with an import column called Additional domains, separated by semicolons. You can't set the primary domain through an import.

One catch: extra domains only apply going forward. Adding one doesn't merge an existing company that already uses that domain. Merge first, then add the alias.

Where does domain matching break?

Exact domain matching is the right first rule. It's fast, it's cheap and it's almost never wrong when it hits. But it misses whole groups of leads. These are the gaps I check in every audit.

Gap Example Why exact domain fails
Free email jane.doe@gmail.com No company in the domain at all
Subdomains jo@eu.acme.com HubSpot treats eu.acme.com as a new company
Country domains jo@acme.de vs acme.com Different root, same company
Rebrands and acquisitions jo@oldname.com The CRM has the new brand's domain
Product or brand domains jo@acmepay.com A brand of Acme with its own domain
Shared or reseller domains Staff on a parent group domain One domain, many operating companies
Typos and junk jo@acme.con Not a real domain
API-created duplicates Two "Acme" companies from a sync Two right answers, one picked at random

That last row deserves a flag. Per HubSpot's deduplication docs, companies created through the API are not deduplicated by company domain name. That includes installed sync apps. So your enrichment tool or data sync can quietly create the duplicates that break matching.

The match ladder: rules from strongest to weakest

This is the core framework. Try each rung in order. Stop at the first one that returns a confident match. Log which rung matched, so you can measure each one later.

Rung Rule Confidence Action
0 Record ID or company ID passed in from the form or source Certain Associate
1 Exact root domain of the email equals a company domain High Associate
2 Root domain is in the alias table for a company High Associate
3 Enrichment returns a company domain that exists in the CRM Medium to high Associate, log source
4 Normalized company name plus country equals one company Medium Associate if one match, else review
5 Nothing confident Low Route by default rules, send to review

A few notes on each rung.

Rung 0 is the one most teams forget. If a lead comes from a page built for one account, or a sales tool that already knows the company, pass the company ID through. Don't make the system guess what it already knows.

Rung 1 is HubSpot's default, with one upgrade. Reduce the email to its root domain first. That turns eu.acme.com into acme.com, so subdomains don't spawn new companies.

Rung 2 uses an alias table. It's a list of extra domains that belong to a known company: country domains, old brand names, product domains. In HubSpot, this is the additional domains on the company record.

Rung 3 calls an enrichment API with the person's email. Many providers can return the company a person works at, even for a Gmail address, if they have a profile. Match the returned domain back to the CRM. This is where data enrichment pays for itself.

Rung 4 compares the company name the lead typed with your company names. It only fires if the normalized name and the country match exactly one company. Two matches means review.

Rung 5 is a dead end on purpose. The lead still gets routed, by your normal round robin or territory rules. But it also lands in a review queue, where a person fixes the match within a day.

What should never be a matching rule?

Some rules look clever and cause damage. I don't use these.

  • Name only, with no country. "Delta" matches an airline, a faucet maker and a dental group.
  • Fuzzy name scores below a strict bar. "Acme Labs" and "Acme Lab Supply" score high and aren't the same company.
  • IP address alone for known leads. A shared office, a VPN or a coworking space puts many companies behind one IP.
  • Last-touch company from ad data. Ad platforms report audiences, not who filled in the form.

If you run website visitor identification, treat its company guess as a weak hint. It's fine for a rung 5 suggestion in the review queue. It's not fine for an auto-match.

How do you normalize domains and company names?

Most "fuzzy" match problems are format problems. Normalize before you compare, and many of them disappear. This is data normalization aimed at one job.

Domain rules

  1. Lowercase everything and trim spaces.
  2. Strip the protocol, "www." and any path or query.
  3. Reduce to the registrable domain. That's the part you can buy, like acme.com or acme.co.uk.
  4. Check it against your freemail list. If it's freemail, skip rung 1 and rung 2.
  5. Check it against your alias table.

Step 3 is harder than it looks. You can't just keep the last two parts, because acme.co.uk would become co.uk. Use the Public Suffix List, which lists known suffixes such as co.uk where people register names. Most languages have a library that reads it.

Company name rules

  1. Lowercase and trim.
  2. Remove legal suffixes: inc, llc, ltd, gmbh, corp, co, plc, sa.
  3. Remove punctuation and the word "the" at the start.
  4. Turn "&" into "and" and collapse double spaces.
  5. Compare the result plus the country code. Never the name alone.

A normalizer you can paste

Here's a trimmed example. It runs in a script, a serverless function or a HubSpot custom code action.

// Trimmed example: normalize email domain and company name before matching
const FREEMAIL = new Set(["gmail.com", "yahoo.com", "outlook.com", "hotmail.com",
  "icloud.com", "aol.com", "proton.me", "gmx.de"]); // keep your full list in a file

// Use a Public Suffix List library in production. This stub handles common cases.
const TWO_PART_SUFFIXES = new Set(["co.uk", "com.au", "co.nz", "com.br", "co.jp"]);

function rootDomain(input) {
  let d = String(input || "").trim().toLowerCase();
  d = d.includes("@") ? d.split("@").pop() : d;
  d = d.replace(/^https?:\/\//, "").replace(/^www\./, "").split(/[/?#]/)[0];
  const parts = d.split(".");
  if (parts.length < 2) return null;
  const lastTwo = parts.slice(-2).join(".");
  return TWO_PART_SUFFIXES.has(lastTwo) ? parts.slice(-3).join(".") : lastTwo;
}

function normName(name) {
  return String(name || "").toLowerCase()
    .replace(/&/g, " and ").replace(/^the\s+/, "")
    .replace(/[.,'"()]/g, " ")
    .replace(/\b(inc|llc|ltd|gmbh|corp|co|plc|sa|limited|corporation)\b/g, " ")
    .replace(/\s+/g, " ").trim();
}

// rootDomain("jo@eu.acme.com") -> "acme.com"
// rootDomain("https://www.acme.co.uk/about") -> "acme.co.uk"
// normName("The Acme Co., Inc.") -> "acme"
// FREEMAIL.has(rootDomain("jane@gmail.com")) -> true

Store the normalized values in their own fields, next to the raw ones. Never overwrite what the lead typed.

Which account wins when companies have parents and children?

Big buyers have structure. A person at a subsidiary may belong to a named parent account that an AE owns. This is your account hierarchy, and it needs its own rule.

My rule: match to the most specific company, then route by the hierarchy. The match tells you where the person works. The hierarchy tells you who owns the relationship.

Situation Match to Route to
Subsidiary has its own owner Subsidiary Subsidiary owner
Subsidiary has no owner, parent is a named account Subsidiary Parent owner
Neither has an owner Subsidiary Default routing for the subsidiary's segment
Open deal on the parent covers this subsidiary Subsidiary Deal owner
Parent is a customer, subsidiary is not Subsidiary Parent's account manager, flagged as expansion

Store both links. The contact associates with the subsidiary as primary. The subsidiary links to the parent. Reports can then roll up to the parent without losing detail. If your object model is still a sketch, the GTM data model guide covers how companies, contacts, deals and signals should relate.

Worked example: a 1,000-lead month

Say a Series B team gets 1,000 new leads a month across demo requests, content downloads and event lists. They build the ladder and log the rung for each lead. Here's an example month.

Bar chart of 1,000 leads by match rung: exact domain 612, alias 74, enrichment 118, name plus country 41, review queue 155.Bar chart of 1,000 leads by match rung: exact domain 612, alias 74, enrichment 118, name plus country 41, review queue 155.
Worked example with assumed numbers: exact domain does most of the work, but the other rungs add 233 matches. Worked example from this guide.

Rung 1, exact root domain, matches 612 leads. Rung 2, the alias table, adds 74. These are country domains and an old brand domain for two big customers. Rung 3, enrichment, adds 118. Most of these are Gmail sign-ups from content downloads. Rung 4, name plus country, adds 41. That leaves 155 leads in the review queue.

So the automatic match rate is 845 out of 1,000, or 84.5%. Before the ladder, with exact domain only and no root-domain step, the team estimated about 560 matches. The subdomain fix alone moved roughly 50 leads from "new company" to the right account.

Now check quality. The team samples 100 auto-matched leads by hand and finds 1 wrong match, a name collision from rung 4. That's about a 1% false match rate. They tighten rung 4 to require the country and a city match for names under six letters.

Those close rates are my assumptions for the example, not a benchmark. Run the math with your own owned-account and round-robin win rates. The direction rarely changes, though. Leads that reach the rep who knows the account close more often.

What should happen after the match?

Matching is only useful if routing reads it. Once a lead has an account, the account decides the route. Here's the order I use.

Check, in order If true Route to
Account has an open deal Yes Deal owner, with a task and a Slack alert
Account is a customer Yes Account manager or CSM, tagged as expansion
Account has an owner Yes Account owner
Account is tier 1 or tier 2 with no owner Yes Named-account queue for that segment
Account has no owner and is in ICP Yes Round robin routing by segment
No match, or out of ICP Yes Default queue or nurture, plus review

Tiering matters in row four. If you don't have tiers yet, the account tiering model shows how to score and split accounts. The lead scoring and routing use case shows how the two fit together in one flow.

Speed matters too. The match has to finish before routing, and routing has to finish in seconds. If matching calls an enrichment API, set a timeout. If the API is slow, route by domain now and correct the match later. The speed-to-lead routing playbook covers the timing.

How do you build the ladder in HubSpot?

You can get most of the way with settings and one code step.

Set the defaults

  1. Turn on "Create and associate companies with contacts" in Settings, Data Management, Objects, Companies, Automation. Choose whether to apply it to existing contacts.
  2. Add freemail and junk domains to the excluded list. The cap is 1,000 domains.
  3. Add alias domains to each company that has them, through the record or an import.
  4. Merge companies that share a domain before you go further.

Add a custom code step for rungs 1 to 4

HubSpot's custom code actions let a workflow run JavaScript, or Python in beta. They need Data Hub Professional or Enterprise. Each run must finish within 20 seconds and use up to 128 MB of memory. That's enough for a normalizer, a CRM search and one enrichment call with a short timeout.

The flow looks like this:

  1. Workflow triggers on contact created, or on email changed.
  2. Code computes the root domain and normalized company name.
  3. Code searches companies by domain, then by alias, then by name plus country.
  4. If nothing matches and the email is freemail, code calls the enrichment API.
  5. Code writes the result back to properties on the contact.
  6. The next workflow steps associate the company and route.

Write the result, not just the link

Each match should leave a trail. I write five properties on the contact. This is the JSON the code step returns.

{
  "match_company_id": "18734002211",
  "match_rung": "3_enrichment",
  "match_confidence": "medium",
  "match_input_domain": "gmail.com",
  "match_resolved_domain": "acme.co.uk",
  "match_timestamp": "2026-12-02T14:07:31Z"
}

Those fields let you report match rate by rung, find weak rungs and audit any routing complaint in seconds.

Create the association through the API if needed

If you associate from outside HubSpot, use the associations API. HubSpot's associations guide shows a default association call with no body. It also lists the type IDs: 1 for the primary contact-to-company link and 279 for an unlabeled one.

PUT /crm/objects/2026-09/contact/12345/associations/default/company/67891

Watch the limits that page lists for association requests. It gives burst limits of 100 requests per 10 seconds on Free and Starter, and 150 on Professional and Enterprise. Batch create takes up to 2,000 inputs per request. If you backfill a big list, batch it.

If you keep accounts in a custom object, like a "workspace" or "location" under a company, the same logic applies one level down. The HubSpot custom objects guide covers when that structure makes sense.

How do you measure matching quality?

Three numbers tell you if matching works. Report them monthly by source and by rung.

Metric How to measure Target
Auto-match rate Leads matched at rungs 0 to 4, divided by all new leads 85%+ for business-email forms
False match rate Wrong matches in a hand-checked sample of 100 Under 1%
Review queue age Median hours a lead sits unmatched in review Under 24 hours
New-company rate Leads that created a brand-new company Watch the trend, check spikes
Duplicate-domain companies Domains with 2+ companies Under 1% of domains

The new-company rate is a good early warning. A spike often means a sync app or a new form is creating companies with bad domains. Fix the source. Don't just merge the output.

The matching scorecard

Score each line 0, 1 or 2. Total out of 16.

# Check 0 1 2
1 Root-domain normalization None Manual cleanup Automatic on every lead
2 Freemail handling Freemail creates companies Excluded only Excluded plus enrichment fallback
3 Alias domains None Some big accounts All known aliases, owned by one person
4 Duplicate-domain companies 5%+ 1% to 5% Under 1%
5 Match logged by rung No Partly Every lead
6 False match sampling Never Once Monthly
7 Review queue None Exists, no owner Owned, under 24 hours
8 Hierarchy rules for routing None Written down Built into routing

Under 8, fix normalization and duplicates before anything else. From 8 to 12, add the alias table and the rung logging. Above 12, spend your time on hierarchy rules and enrichment coverage.

Common mistakes in lead-to-account matching

These are the ones I see most.

  • Matching before deduplicating. Two companies with one domain turn every match into a guess. Merge first.
  • Letting freemail create companies. You end up with a "Gmail" company holding 3,000 contacts. Exclude freemail domains on day one.
  • Ignoring subdomains. HubSpot treats eu.acme.com as its own company. Normalize to the root domain.
  • No owner for the alias table. Aliases go stale after every acquisition. Name one person to keep it current.
  • Auto-matching on weak rules. A fuzzy name score feels smart until it routes a buyer to the wrong rep. Send weak matches to review.
  • Not logging the rung. Without it, you can't tell which rule causes bad matches.
  • Backfilling without a backup. Associations change workflows and reports. Export first, then run.

Imports cause many of these problems. If your lists come in through CSV uploads, the guide to HubSpot imports without duplicates covers the checks to run before you click import.

Which tools help with lead-to-account matching?

You don't need much to start. Here's how I think about the options, without naming a winner.

Option Good for Watch out for
HubSpot built-in association Rung 1 for every team Subdomains, freemail and duplicates need extra rules
HubSpot custom code action Rungs 1 to 4 in one place Needs Data Hub Professional, 20-second limit
Enrichment providers (Apollo, People Data Labs, ZoomInfo, HubSpot Breeze Intelligence) Rung 3 for freemail and missing domains Per-lookup cost, coverage varies by region
Routing tools (Chili Piper, Default) Teams with many reps and changing territories Another system to own, check how it matches
A small service you host Full control, any data source You maintain it

My take: start with HubSpot's setting plus a custom code step. That covers most teams below 30 reps. Add a routing tool when territory rules change monthly and nobody wants to edit code.

What to do this week

Spend one week on this and you'll know exactly where you stand.

  • Export companies and count domains that appear on two or more records.
  • Pull last month's new leads and count how many have no company.
  • Check how many companies HubSpot created from subdomains or freemail.
  • Start an alias table for your top 50 accounts.
  • Sample 50 recent matches by hand and count the wrong ones.
  • Write the hierarchy routing rule down in one paragraph.

Then build the ladder one rung at a time and log the rung on every lead. Clean the history with the CRM cleanup use case approach before you backfill.

The bottom line on lead-to-account matching

Exact domain matching is a fine first rule and a bad only rule. The fix isn't a smarter algorithm. It's a ladder with clear rungs, clean company records and a log that shows which rule did what.

If you'd rather have the ladder, the routing and the monitoring built and handed over, that's core GTM engineering work. It's also a common first project for the teams on our page for GTM engineers. Fast routing only pays when the match is right, which is why I pair this with the speed to lead playbook.

FAQ

What is lead-to-account matching?

Lead-to-account matching is the process of linking a new lead to the company record it belongs to. Once linked, the lead can be routed to the account owner, scored with account data and counted in account-based reports. Most systems match on the email domain first, then fall back to enrichment data, company name and a manual review queue.

How does HubSpot match contacts to companies?

HubSpot compares the domain in a contact's email to the company domain name on company records. If they match, it associates the two. If no company exists, it creates one. Free email addresses fall back to the contact's website URL, and if that is empty, nothing is associated. Subdomains count as separate domains.

What is a good lead-to-account match rate?

For B2B inbound with a business email form, 85% or more of leads should match automatically to a company you already have or can create. The rest go to a review queue. More important than the rate is the false match rate. Aim for under 1% wrong matches, because a wrong match sends a lead to the wrong rep.

How do you match leads that use Gmail or other free email addresses?

Don't match on the email domain. Use other clues in order: a company or website field on the form, a person-level enrichment lookup on the email, then the IP-based company if you run visitor identification. If none gives a confident answer, route the lead by normal rules and flag it for review instead of guessing.

Should a lead match to the parent company or the subsidiary?

Match to the most specific company the email domain points to, usually the subsidiary. Then use the account hierarchy to decide ownership. If the parent is a named account with an owner, route to that owner. If not, route to the subsidiary's owner. Store both so reporting can roll up to the parent.

Do you need a tool like LeanData to match leads to accounts in HubSpot?

Not always. HubSpot's built-in association by domain covers the first and biggest tier. A small custom code step can handle alias domains, freemail and fuzzy names. Dedicated routing tools earn their cost when you have many reps, complex territories and parent-child rules that change often.

More like this

Glossary: Company Domain, Fuzzy Matching

Startup? Let's talk.

20 minute fit call. You'll leave knowing the first thing we'd fix and roughly what it costs. If we're not the right fit, we'll tell you who is.