Enable visitors to find content on your site.
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 (version 7.0 only)
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.
Searching specific terms yields the best results. For example, if there are two totally separate words on one page, the page may not appear in results when searching for both words unless they're close together.
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.
Keep in mind:
- Pages with noindex tags and pages in your Not linked section are indexed for site search. To prevent their content from appearing in search results, 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.
- Pages in member sites aren't indexed for site search.
- Text blocks
- Markdown blocks
- Inline image block captions, but not titles and subtitles of other image layouts
- Quote block text
- Audio block title
- Map block address
- Amazon block item title
- Each blog post’s title, author, excerpt, and location
- Each event’s title, author, excerpt, and location
- Each portfolio sub-page's title
- Each product’s title and text in the product item's settings
- Each video item's title, excerpt, and description
- Tags and categories added to any blog post or event
Because results are sorted by relevance, events might not appear chronologically, and 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.
Pages and sections
- Page title (and page description in version 7.0) as set in page settings
- Tags and categories on blog pages and events pages, even if they're not currently added to an item
Gallery pages (version 7.0 only)
- Page title and page description as set in page settings
- Each image and video’s title, author, and description
- Each image and video’s tags and categories
- Each image and video's file name
Album pages (version 7.0 only)
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:
Replacing yourdomain with your site URL.
Add a search block
Add a customizable search field to any block content area of your site, like layout pages, blog posts, and footers, with a search block.
The search block is more flexible than the search page. You can set the search block to search your entire site or limit its search to a specific collection, like a blog page, while the search page automatically searches all site content. You can also set search block results to auto-populate as a visitor types.
Header search bars (version 7.0 only)
Some version 7.0 templates support a built-in search bar in the header. This is a great way to integrate site-search into your design and make it accessible to visitors. Click the links to learn how to display and style the search bar in these template families:
If your site is on version 7.1 or a version 7.0 template that doesn't support a built-in search bar, it's not possible to add a search field above your page content. However, you can add a search block to individual pages or create a link in your navigation to the built-in search URL.
Style search results
Your search page and search results follow your site-wide font and color settings. For example, if search result text displays in a certain color, it's likely following a Paragraph or Body color tweak. The search block includes some built-in styling options, but its results will also follow your site styles.
To learn more, visit Changing colors.
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.
Troubleshooting search results
Try the following steps if search results aren't appearing as expected:
- 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. Review 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.