You can add search fields to your site to help visitors find content. This guide covers methods for adding search, which content can appear in search results, and how to troubleshoot common issues.
Visitors can search your content with these features:
- Search Block
- Built-in search page URL
- Built-in header search fields available in select templates
Tip: For help with SEO and your site's appearance in external search engines, like Google and Bing, visit Increasing your site’s visibility to search engines.
Making search successful
Like any search engine, site search results are based on the quality of your site's content. To improve results, we recommend adding descriptive and accurate titles, descriptions, excerpts, tags, categories, and keyword-rich content across your site.
Indexed content
The areas below are indexed for site search using the Search Block, search URL, or built-in search feature. Any areas excluded from this list aren’t indexed. Search results are sorted by relevance.
Tips
- Pages with noindex tags and pages in your Not Linked section are indexed for site search. To prevent this, use a page password.
- Unpublished content, like blog post drafts, may appear in search results when you're logged in. It won't appear to visitors.
Blog Pages
- The blog’s page title and page description as set in Page Settings
- Each post’s title, author, excerpt, and location
- Text Blocks
- Markdown Blocks
- Code Blocks, except text surrounded by JavaScript and CSS tags
- Inline Image Block captions, but not titles and subtitles of other image layouts
- Quote Block text
- Audio Block title
- Map Block address
- Amazon Item Block title
- Tags and categories
Layout Pages
- Page title and page description as set in Page Settings
- Text Blocks
- Markdown Blocks
- Code Blocks, except text surrounded by JavaScript and CSS tags
- Image Block captions for the Inline layout, but not image titles or subtitles
- Quote Block text
- Audio Block title
- Map Block address
- Amazon Item Block title
Note: Text for images uploaded directly to Gallery Blocks won't be indexed. To have a Gallery Block with text information that appears in site search results, create a Gallery Page first, then choose Use Existing Gallery when adding the Gallery Block to a Layout Page.
Gallery Pages
- Page title and page description as set in Page Settings
- Each image’s title, author, and description
- Each image’s tags and categories
- Each image's file name
Events Pages
- Page title and page description as set in Page Settings
- Each event’s title, author, text in the Excerpt, and location
- Text Blocks
- Markdown Blocks
- Code Blocks, except text surrounded by JavaScript and CSS tags
- Image Block descriptions
- Quote Block text
- Audio Block title
- Map Block address
- Amazon Item Block title
- Tags and Categories
Order of events in search
Since results are sorted by relevance, events might not appear chronologically.
Past events in search
Past events might display in search results. To exclude them, you can hide past events, but this will also hide them from your Events Page.
Products Pages
- Page title and page description as set in the Product settings
- Each product’s title and text in the product item's settings
- Tags and categories
Album Pages
-
Track title
Add a Search Block
Add a customizable search field to any content area of your site, like Layout Pages, sidebars, and footers, with a Search Block. You can set the Search Block to search your entire site or limit its search to a specific collection, like a Blog Page. You can also set results to auto-populate as a visitor types.
Use the built-in search page
Every Squarespace site has a built-in search feature accessible by adding a /search slug to your domain, such as:
- yourdomain.squarespace.com/search
- yourdomain.com/search
Replacing yourdomain with your site title.
This page is a great internal tool to quickly find site content. You can also use this URL to create a public search page by linking to it from your navigation, a text link, or button.
Header search bars
Some templates support a built-in search bar in the header. Click the link to learn how to display and style the search bar in these template families:
This is a great way to integrate site-search into your design and make it accessible to visitors.
Track visitor searches in Analytics
For a report on terms visitors are entering in these search fields, visit the Site Search Queries panel in Analytics.
FAQ
Can I add a site-wide search to the top of my site?
Unless your template supports a built-in search bar, it isn't possible to add a search field above your page content. However, you can add a Search Block to individual pages.
Another option is to create a link in your navigation to the built-in search URL.
How is the search page different from the Search Block?
The Search Block is more flexible than the search page. While the search page automatically searches all site content, the Search Block can search your entire site or only a particular collection. The Search Block can also be added to any part of your site that supports blocks.
To learn more, visit Using the Search Block.
How do search results populate?
Site search results are based on the quality of your site's content. To improve the quality of results, follow our tips for making search successful.
Why isn’t my search query generating results?
Try the following steps to generate search results:
- Clear your browser’s cache, as it could be loading an earlier version of your site. You can also disable browser extensions or try a different browser or incognito mode.
- Remove your site-wide password, if you have one in place, and remove any page passwords from pages with Search Blocks.
- Ensure that your search terms are added somewhere in your searchable site content. See the indexed areas in the indexed content list above.
If you're still not seeing results after following these troubleshooting steps, contact us. We're always here to help.