Engineering
SearchHow-toSite search

How to add search to your website: upload a file or import your site

By Aakash Ahuja14 min read
Diagram showing how to add search to a website: a CSV, JSON or product feed, or a website import, builds a search index that powers a search box on your site.

Adding search to a website is mostly a data job. The whole path in nine steps: bring your catalogue in as a file or import it from your site, verify the domain, test, then put a search box live.

What does it take to add search to a website?

To add search to your website you need three things: a searchable copy of your content (an index), a box or page that sends visitors' queries to it, and a way to see which searches found nothing. With Tomorrow Central Search, you get the content in by uploading a CSV, JSON or Google Merchant feed, or by importing it from your own site. You verify that the site is yours, then paste a search box or link to a results page.

The box is the easy part. Most attempts to add search to a website go wrong behind it: the index is missing half the catalogue, product links point nowhere, or nobody looks at what visitors typed and failed to find. Site search means a search over your own site's content only, and a zero-result search is a query that returned nothing.

The zero-result searches are where the work is. On one live catalogue, the same engine cut zero-result searches roughly tenfold (measured differently before and after; see the case study).

A site search is only as good as the list behind it. Three fields per item (an id, a title and a URL) decide whether the box returns anything useful.

This guide is for website owners, marketers and solo developers who run a catalogue or content site and want working search this week, without building a search engine. If you are still deciding whether your catalogue needs search at all, start with the pillar guide on site search for a catalogue.

How do the pieces of site search fit together?

PieceWhat it isWhat it decides
Content sourceA file you upload, or an import of your websiteWhich items can ever be found
ProjectOne searchable catalogue: its index, vocabulary, rules and statisticsWhat a search runs against
Verified websiteA site you have proved you controlWhere the importer may crawl and where results may be served
Public keyA pk_ key tied to one project, usable only from your verified siteWho may query the project from a browser
Search box or results pageThe widget, the hosted results page, or your own pageWhat visitors see
StatisticsSearches, zero results, clicks and speed for the projectWhat to fix next

Why do website search boxes fail after launch?

They rarely fail on day one. They fail quietly, because nothing errors when a search returns nothing useful. The usual causes:

The steps below are ordered so each of these is caught before visitors see it.

Which should you use: a file upload or a website import?

There are two ways to get your catalogue into the index. Pick by whether you already have a clean export.

File uploadWebsite import
What you provideA CSV, JSON or Google Merchant RSS/Atom feedYour website's address
Best whenYour shop, CMS or spreadsheet can export items with an id, title and URLYou have no clean export, or your pages are the catalogue
What it readsExactly the rows you sendrobots.txt and sitemaps first; otherwise a same-host crawl up to three links deep
Shopify and WooCommerceUse a Google Merchant feed, or a CSV with id, title and url columnsProducts are read through the store's API
Keeping it freshUpload again (an upload replaces the whole index)Scheduled re-imports
Needs a verified websiteTo serve results publicly, yesYes, before the import runs

A file gives you the most control: what you send is what gets indexed. An import saves you preparing a file, but it can only index what your site lets it reach.

What do you need before you start?

How to add search to your website, step by step

The Search page shows a setup checklist that ticks off the main milestones (website verified, project created, catalogue added, search link created, first visitor search) from what is actually set up.

Step 1: Sign up for Search

Sign up for Search. Sign-up is open to the public, and signing up from this link switches Search on for your organisation.

Step 2: Check that Search is switched on

If you signed up from the Search page, Search is already on. Otherwise, open Organization in the dashboard and switch Search on under Softwares. Until it is on, the Search pages tell you it isn't on yet, and every Search request is refused for your organisation.

Step 3: Verify your domain with a DNS TXT record or a .well-known file

Open Websites in the dashboard menu and add your website. You prove ownership in one of two ways:

Each website you add is verified on its own. A DNS check also covers the www. version of the domain; any other subdomain, such as shop.example.com, is added and verified separately. A domain can belong to only one organisation. Website import needs a verified site, and so does the public search link.

Verification is re-checked regularly; leave the record or file in place.

Step 4: Create a search project

Open the Search tool and create a project. A project holds one searchable catalogue, with its own vocabulary, rules and statistics. The free plan includes one project.

Step 5: Upload a CSV, JSON or product feed, or import your website

Open the project's Catalogue tab and either upload a file or import from your website.

An upload replaces the whole index. Always send the full catalogue, not just the new items.

Read the skipped-rows report before moving on. A missing URL in your export is easier to fix now than after visitors have seen empty results.

Step 6: Test your search while signed in

Open the Try it tab and search your own catalogue as a visitor would. Try your ten most obvious queries, two or three misspellings, and something you know you don't sell. Try-it searches are not counted in your statistics or your monthly search allowance.

If a product should always come first for a query, the Rules tab lets you pin up to three results to the top or hide results you don't want shown, and preview the results with and without your rules.

Step 7: Create your search link (public key)

Open the Search link tab and choose Create my search link. This issues a public key (it starts pk_) tied to exactly this one project. The key only works while Search is on and your website is verified, and browsers may call it only from your verified site's exact origin. A copied key on someone else's site gets nothing back. You can switch it off from the same tab with Turn this link off.

Step 8: Add a search box or results page to your site

The Search link tab gives you three ways to show results. Pick one, or combine them.

  1. The search widget. Paste the widget.js snippet into your site's template. It adds a type-ahead search box, with suggestions as the visitor types, grouped by type when your items carry a public type field.
  2. The hosted results page. Results appear on a page hosted at https://search.tomorrowcentral.com/s/{key}?q=. Use the ready-made search box snippet from the Search link tab, or point any form at your search link. This is the low-code route.
  3. Your own results page. In the Search link tab, under Show results on your own website, copy one line onto the page where results should appear, then save that page's address. It must be https on your verified website. Searches from your link, search box and widget then open there, in your site's own design.

Step 9: Watch your search statistics

The Statistics tab shows searches, zero-result searches and their rate, clicks and click-through rate, spelling corrections, response time (p50 and p95), a daily series, and your top queries, top zero-result queries and most-clicked results. The setup checklist's last item ticks when the first visitor search arrives through your link.

What format does the catalogue file need?

Every item needs three fields. Everything else is optional.

FieldRequired?What it is
idYesA stable, unique identifier: your SKU, product id or page id
titleYesWhat the visitor sees and what matches most strongly
urlYesThe full address the result links to
summaryNoA short description shown with the result
bodyNoLonger text to search within

Three formats are accepted:

id,title,url,summary
SKU-1042,Linen trousers navy,https://example.com/p/linen-trousers-navy,Relaxed fit linen trousers
SKU-1043,Linen shirt white,https://example.com/p/linen-shirt-white,Short-sleeve linen shirt
{"items": [{"id": "SKU-1042", "title": "Linen trousers navy", "url": "https://example.com/p/linen-trousers-navy"}]}

How the upload treats your data:

What does the website importer do on your site?

Tomorrow Central Search's importer is built to behave like a well-mannered crawler on a site you own. At summary level:

If an import comes back smaller than expected, check robots.txt and noindex before anything else.

Where should search results appear?

OptionEffortGood forTrade-off
Search widget (widget.js)Paste one snippetType-ahead suggestions on every pageNeeds access to your site template
Hosted results page (/s/{key}?q=)Link a formGetting live fastest; site builders with limited script accessResults open on a page we host
Your own results pageOne pasted line on a page of your siteKeeping visitors on your domain, in your designhttps on your verified site required

A common pattern is the widget in the header for suggestions, with Enter sending the full search to a results page: the hosted page, or your own if you set one.

What should you check in the first week?

NumberWhereWhat it tells you
Zero-result rateStatisticsShare of searches that found nothing. The headline health number
Top zero-result queriesStatisticsExactly what to add, rename or describe better
Click-through rateStatisticsWhether results look worth clicking
CorrectionsStatisticsHow often a misspelling was fixed
p95 response timeStatisticsWhether the slowest searches still feel instant

Spelling correction works against your project's own vocabulary, the words in your catalogue, not a general dictionary. That is why "trowsers" can find trousers on a clothing site without matching unrelated words. The word the visitor is still typing is left alone. Vocabularies are per project and never shared between organisations.

Zero results are where the work is. For the wider question of which numbers matter, see how to measure search success.

This approach suits public catalogues and content sites. It is the wrong tool when:

If your search has to run inside your own infrastructure, Search is also available on-prem through ITMTB.

Common mistakes when adding a search bar to a website

  1. Uploading a partial file to "add a few products". An upload replaces everything. Always send the full catalogue.
  2. Relative URLs in the export. Send the full address, https://example.com/p/123, not /p/123. A relative URL is skipped as a bad URL.
  3. Reusing ids across product variants. The last row wins, so the other variants disappear.
  4. Removing the verification record after it turns green. Verification is re-checked regularly; leave the record or file in place.
  5. Assuming a subdomain is covered. Only www. rides on a DNS check. shop.example.com needs verifying on its own.
  6. A robots.txt that blocks everything except Google. The importer follows your rules, so it indexes nothing.
  7. Judging quality from your own test searches. Try-it searches aren't counted. Real visitor queries are the test that matters.
  8. Never opening the zero-result list. It is the one report that tells you what to fix next.

Key takeaways

Start adding search to your site

The free plan covers one project, up to 5,000 products and 10,000 searches a month at the time of writing. Past the monthly limit there is a grace allowance of up to 10% more within 7 days, after which searches are refused until the next month. Sign up for Search. It switches Search on for you, and the setup checklist takes it from there. Plan details are on the Search page.

References

Frequently asked questions

How do I add search to my website without coding?
With Tomorrow Central Search, upload your catalogue as a CSV, JSON or product feed, or import it from your site, then use the ready-made search box snippet or point a plain form at your search link. That needs no programming. The search widget takes one pasted snippet in your site template.
What file format do I need to add site search?
A CSV, a JSON list (or an object with an items list), or a Google Merchant RSS or Atom feed. Each item needs an id, a title and a full URL; a file without those columns is refused. A summary and body text are optional, and rows missing a required value are skipped and reported.
Can I add search by importing my website instead of uploading a file?
Yes. Tomorrow Central Search can import from a website once it is verified. The importer reads robots.txt and your sitemaps first, otherwise crawls the same host up to three links deep, and respects noindex. Shopify and WooCommerce products are read through the store's API.
Why do I have to verify my website?
Verification proves the site is yours before anything crawls it or serves public results for it. You add a DNS TXT record or a file under /.well-known/. Each website is verified on its own (a DNS check also covers www.). Verification is re-checked regularly, so leave the record or file in place.
Can someone copy my public key and use it on their site?
Not usefully. A public key belongs to one project, works only while your website is verified, and browsers are allowed to call it only from your site's exact origin.
Does the search handle misspellings?
Yes. It corrects spelling against the words in your own catalogue rather than a general dictionary, and leaves the word still being typed alone. Corrections are counted in your statistics.
How many items can I add?
The free plan covers up to 5,000 products at the time of writing. Each project has an item limit, so very large catalogues may need a different approach.