Skip to main content
Use case prompt
Customer lists, CRM exports, and form input give you names like “The Home Depot”, not domains. A logo next to each name makes the list easy to scan, and you do not maintain a name-to-domain table. Your app decides how far to trust a match, what an unmatched name shows, and whether to store the domain.

Choose how to resolve the name

  • You only show the logo. Build a name lookup URL from the encoded name. Your app stores nothing.
  • You must know which company a name means. Send the name to Search from your server, once per name. Save the domain of the best candidate, and render the logo with a domain lookup.
  • A person enters the name. Let them pick from suggestions with the company autocomplete.
This server route resolves one name to its best candidate:
api/resolve-company.ts

Handle every name state

With Search, save the result with the record, and render from it: A wrong match still returns a real logo, so a status check cannot catch it. Let users correct the company.

Render the list

This component shows an initials avatar when no company matches the name. Without fallback=404, the URL returns a generated monogram instead:
If you saved a domain with Search, render the logo from the domain, not from the name.

Test the list

Test with a multi-word name such as “The Home Depot”, a name with & such as “AT&T”, and a spelling that misses, such as “Sweet Green”. Check that the miss shows the initials avatar. Make a search fail, and check that the name stays on screen. Then check that a corrected row keeps its correction.

Logo.dev CDN by name

Encoding rules, parameters, and matching for name URLs.

Company autocomplete

Let people pick the right company while they type.