Using Swiftype with Squarespace

Last updated September 26, 2023

Swiftype is a third-party service you can use to add a search engine to your site.

Note

For the best search experience, we recommend using our search block instead of a third-party service.

Accessing this feature

The steps in this guide include code injection and adding advanced code to the code block. These are premium features available in Business and Commerce plans.

Before you begin

  • To add a Swiftype search field, your site must be public. Visit Publishing or hiding your site for help updating your settings.
  • You can have one Swiftype search field per page. If you add multiple, none will work.

Get the Swiftype install code

Create a search engine and copy the install code in Swiftype:

  1. Log into your Swiftype account and click Create A New Engine.
  2. Enter your website URL, and click Verify URL.
  3. Swiftype will crawl your site and create your search engine, showing the progress along the way.
  4. Name your search engine and click Create engine.
  5. Click Complete Setup.
  6. On the next screen, click Install Search.
  7. Customize your search field, then click Activate Site Search.
  8. Copy the install code and save the search field code.

Add the code to your site

In Squarespace, add the code to your site using code injection and code blocks.

Step 1 - Add the install code to your site's code injection

  1. Open the Code Injection panel.
  2. Paste the install code in the Header field.
  3. Click Save.

Step 2 - Add the search field code to a page

After you add the install code to your site's code injection, add the search field code to pages where you want the Swiftype search field to appear:

  1. Click an insert point and select Code from the block menu. For more help with this step, visit Using the code block.
  2. Paste the Search field code.

Note

This code-based customization falls outside the scope of our support. This means that we’re unable to help further with setup or troubleshooting. Additionally, since this is a code-based solution, we can’t guarantee its functionality or full compatibility with Squarespace. This includes how it functions with our responsive design, particularly its appearance on mobile devices, and if it functions on all templates. Code-based customizations can also cause display issues with future updates to our platform. While we can't help further, there are many resources that can point you in the right direction:

Footer Image
  • Get help from our community

  • Get help from our community on advanced customizations.

  • Hire a Squarespace Expert

  • Stand out online with the help of an experienced designer or developer.