How to set up internal search with Algolia in Yoast SEO Premium?
When people land on your website, they most likely need to find some specific information. That is why it is crucial to set up an excellent internal search function. Doing that will improve the user experience on your site and allow people to find what they need. Moreover, it will increase the chances people will stay on your site longer. To help you get better internal search results on your site, we integrated WP Search with Algolia with Yoast SEO Premium!
The integration is based onĀ Yoast SEO Premium’s internal linking metrics. Yoast SEO counts the links that posts and pages have pointing to them. The more links to a post or page there are, the more important search engines consider it to be. So, those pages are also most likely to rank higher in the search results. With this integration, we mimic that ranking within your internal search results. When someone uses your internal search, we’ll show them your most linked-to posts and pages at the top. As a result, people will easily find the best content on your site!
Want to learn how to use this feature? Read on!
Set up the internal search with Algolia and Yoast SEO Premium
To improve your internal search with Algolia, follow these steps:
- Update Yoast SEO Premium so you’re running version 16.7 or higher
- Make sure you have installed and activated the WP Search with Algolia plugin
You can search for WP Search with Algolia under Plugins>Add new Plugin in your Dashboard.
- Enable the Algolia integration
In the Yoast SEO menu under Integrations, slide the toggle to the right to enable the integration.
- Log into Algolia or create an account to manage your API keys
Log into your Algolia account or create an account. Click on Manage your Algolia API Keys to get the right code.
- Under Search Page in the Algolia Search menu, click on Re-index All Content
This can be done on your WP Search with Algolia plugin settings page. Also tick Use Algolia with instantsearchjs to start using the Algolia integration.
- On the Algolia website, log into your account and go to Search
In your dashboard, click on Search under Products.
- Under Index or Indices, click on Configuration
Click on the right Index, or Indices (if you have more than one index), and click on Configuration.
- Under Ranking and Sorting, click on + Add custom ranking attribute
- Add yoast_seo_links
After re-indexing your site, you can now find the
yoast_seo_links
links attribute. Click on it to add it to your ranking and sorting list. - Move yoast_seo_links to the second position
You can drag the ranking attributes: move
yoast_seo_links
to the second position. - Test the search engine on your site
You should see better results because your important pages are the ones you link to the most!
That’s it! With this simple but powerful integration, you can drastically improve the user experience on your site. Want to learn more about the technical details and how Joost came up with the feature? Read Joost’s blog!