search mobile facets autocomplete spellcheck crawler rankings weights synonyms analytics engage api customize documentation install setup technology content domains user history info home business cart chart contact email activate analyticsalt analytics autocomplete cart contact content crawling custom documentation domains email engage faceted history info install mobile person querybuilder search setup spellcheck synonyms weights engage_search_term engage_related_content engage_next_results engage_personalized_results engage_recent_results success add arrow-down arrow-left arrow-right arrow-up caret-down caret-left caret-right caret-up check close content conversions-small conversions details edit grid help small-info error live magento minus move photo pin plus preview refresh search settings small-home stat subtract text trash unpin wordpress x alert case_deflection advanced-permissions keyword-detection predictive-ai sso

Site Search Quick Start

Site Search is the easiest way to add a search to your website. The key to its simplicity is the dynamic, automated Site Search Crawler. A crawler is what one calls a script that scans the content and structure of publicly available webpages.

The crawler will crawl across your pages depending on the website address that you provide: https://example.com. Once crawled, your pages are indexed so that they are available for search and result customization.

An excellent and valuable search experience can be yours in just a couple of minutes:

  1. Create an account
  2. Create an Engine
  3. Install Site Search
  4. (Optional) Customize your crawling
  5. (Optional) Advanced design implementations

0. Create an account

You will need to create a Site Search account to begin.

Be sure to confirm your email address!

1. Create an Engine

As part of the account creation process, you will be asked to create your first Engine. Engine is short for Search Engine - it is the sophisticated control center, the brain of your search experience.

After beginning your Site Search trial, enter your website's URL when prompted.

Note: You have the option of creating an API-based Engine, too.

Creating an engine


The crawler will undergo a preliminary scan of your website known as a "pre crawl". You will be notified of any issues that arise during pre crawl. Once the scan is successful, the next step is to provide your Engine with a name and select its default language.

You can choose from over 13 different languages including: English, French, Chinese, Japanese, Korean, Russian, and German. For a full list, see our section on Multi-language Engines.

Creating a Korean Engine


Great ~ we are almost there...

Next, we will configure your first search experience. You can do so by clicking on the Installation button within step 2 of the dashboard tutorial. This will take you through the design of your Search Field and Result Container. You can use the Site Search defaults, the tab and the overlay, or configure it to work with your pre-existing search field.

You can choose how to style your results, configure autocomplete, and calibrate a wide array of options:

Creating an engine


Once you have a basic configuration, click on Activate Site Search. This will provide you with an embeddable JavaScript snippet within each webpage for which you would like to enable search.

The snippet will look like this:

<script type="text/javascript">
  (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
  (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
  e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
  })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

  _st('install','xxx-xxxx-xxx','2.0.0');
</script>

Your own snippet will be generated once you complete the installation process. We have a Design and Customizations guide to help you craft your next search experience. It is a terrific starting point.

From the dashboard, you can style your results, configure autocomplete, and calibrate basic color options:

Creating an engine


With that, we have accomplished the following:

  • Created an Engine.
  • Crawled your website and indexed your webpages, turning them into searchable documents.
  • Styled our search field and our result container.
  • Installed the embedded Site Search snippet.

You now have the fastest and simplest way for users to discover the valuable content within your pages. If you stop here, you will have an optimized, out-of-the-box Site Search installation.

Congratulations!

The next steps are optional but can help you build deeper search experiences. You can customize your crawler settings or look into advanced design implementations.

3. (Optional) Customizing your crawl

The standard Sites Search implementation produces satisfying results on most websites. However, you can customize deep into Site Search features and configure the crawler in different ways.

Meta Tags

Site Search Meta Tags give you an easy way to override how title or section data is extracted from a page. They can also be used to add powerful utility, like associating an image with a page or filtering pages by type.

For example, if a page has a title like "MySite.com -- Books -- The Master and Margarita by Mikhail Bulgakov" and you would like the title in search results to be "The Master and Margarita", you can use Site Search Meta Tags to customize the default value of the title field.

Example - Using title
<html>
  <head>
    <title>MySite.com -- Books -- The Master and Margarita by Mikhail Bulgakov</title>
    <meta class="swiftype" name="title" data-type="string" content="The Master and Margarita" />
  </head>
  ...
</html>

Building on the previous example, you can also associate an image with a page. The image will be displayed in the search results.

Example - Using image
<html>
  <head>
    <title>MySite.com -- Books -- The Master and Margarita by Mikhail Bulgakov</title>
    <meta class="swiftype" name="title" data-type="string" content="The Master and Margarita" />
    <meta class="swiftype" name="image" data-type="enum" content="http://mysite.com/images/the_master_and_margarita.jpg" />
  </head>
  ...
</html>

Read more: Meta Tags.

Excluding content by URL

Site Search allows you to limit the crawler to specific areas of your website using path inclusions and exclusions.

  • Whitelists only index URLs matching a pattern.

  • Blacklists do not index URLs matching a pattern.

Whitelists and blacklists can be combined for precise control over what will be indexed on your site.

Consider this example:

Path rule example

This will make Site Search index only URIs starting with /documentation and /questions and not ending with /danger. You could use this to index only support or product related materials, while excluding content that might not be valuable or relevant.

Read more: Path Whitelist and Blacklist Rules

Excluding pages with robots.txt

Site Search supports the robots.txt standard. You can use that file to exclude pages you do not want indexed. The robots.txt file is used by major search engines like Google, DuckDuckGo and Bing, in order to rank your webpages. Interfering with that process could have dire consequences. As such, you can specify the Swiftbot User-agent:

Example - robots.txt file restricting Swiftbot while allowing all other User-agents.
## Don't let Swiftbot index the pages under /archives/

User-agent: Swiftbot
Disallow: /archives/

## Allow other agents to index the entire site
User-agent: *
Disallow:

Read more: Robots.txt support.

4. (Optional) Advanced design implementations

The Site Search Result Designer works well for customizing the basic styling of your search results and autocomplete menu, but more advanced implementations are also possible by using our our jQuery search and jQuery autocomplete plugins.

For additional information about these plugins, visit our jQuery tutorial.

What next?

Looking for some more reading materials? You may want read more about the Site Search Crawler. Another option is to explore the wide array of useful Features that are available to all Site Search users. If you want to get deeper into a code-level implementation, checkout API-based Engines.


Stuck? Looking for help? Contact support or check out the Site Search forum!