Note: While our most popular guides have been translated into Spanish, some guides are only available in English.
Using Swiftype with Squarespace

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.
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 box, your site must be public. Visit Managing your site's visibility for help updating your settings.
  • You can have one Swiftype search box 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 box, 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. In the Home Menu, click Settings, click Advanced, then click Code Injection.
  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 box 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. 
  3. Click Save.

Note: This third-party 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. Third-party 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:

Was this article helpful?
5 out of 5 found this helpful