# Search with Algolia

> Keep your published pages in Algolia for your website's search, updated as you publish, and rebuild the index when you need to.

Source: https://docs.bifrostorbit.com/cms/editors/search-with-algolia/

If your website's search runs on [Algolia](https://www.algolia.com), CMS Orbit keeps your published pages there for you. Visitors to northwilds.com who search for "lofoten" find the Lofoten ridge trip the moment it is published, and stop finding it once it is unpublished.

Algolia needs Growth or higher.

## Connect Algolia

An owner or admin connects Algolia once for the whole organisation, in Orbit under **Connections**, with the Algolia app ID, an admin API key and an index prefix such as `northwilds`. Orbit checks the key before it saves the connection. See [Connect services and your own bucket](https://docs.bifrostorbit.com/orbit/admins/connections/).

Every space then keeps its published pages in Algolia, in one index for each environment and language, such as `northwilds_website_production_en-gb`. Staging has its own indices, so you can try your search before you publish to production.

## What goes into the index

For each published page: its title, address, SEO description, content type, language and region, and the words in its text fields, including the text in its components. Drafts, entries without an address and pages hidden from search engines under **SEO** are left out. Nothing else is sent to Algolia.

Pages are updated when they are published, unpublished, moved, deleted, restored or published in a release. Long pages are shortened to fit Algolia's limit on the size of a record.

## Rebuild the index

Open **Settings** in the space. The **Algolia** section lists the indices and when they were last rebuilt. Choose **Rebuild index** to send every published page again, for example:

- after you connect Algolia, to add the pages published before,
- after you change the index prefix in Orbit,
- when the indices and your pages no longer match.

The rebuild runs in the background and takes a few minutes for a large space. Your website's search keeps working while it runs: the new index replaces the old one in one step when it is ready, and it keeps the ranking, synonyms and rules you set up in Algolia. You need permission to change the space's settings.
