Fix Rank Math Search Results Page Title

While looking at Google Analytics for one of my niche websites, I discovered that the default setting for Search Results Title in Rank Math contains a bug where the reference to the search term is not applied to the <title> tag correctly.

In this article, i’ll be giving you the information required to fix this issue!

Fix Rank Math search results page title

Rank Math search results page title not showing search term

While looking in Google Analytcis, I spotted that my website search results page was recording visits, but that the search term wasn’t included in the page title, which in theory, should create unique records per unique search term.

Google Analytics results, you search for

This means that all search pages recorded in Google Analytics contain the same page title with the following pattern:

You searched for – [sitename]

Whereas you’d probably much prefer to have unique page titles that include the searched term, something like the following pattern:

You searched for [search term] – [sitename]

Fix Search Results Title in Rank Math

So how do we fix this bug in Rank Math?

First, navigate to Rank Math > Titles & Meta > Miscellaneous Pages, then scroll down to Search Results Title.

Rank Math default Search Results Title

You will see the default value for this field is:

You searched for %searchphrase% %page% %sep% %sitename%

How to fix search result title in Rank Math

To correctly display the user’s search term in the search results page title, which Google Analytics will start to pick up unique search query results page titles, you should replace the above with the following:

You searched for %search_query% %page% %sep% %sitename%

Rank Math correct Search Results Title

So all we’re doing here is effectively replacing the incorrect default variable reference of %searchphrase% with the correct variable reference of %search_query%

Immediately you will notice the example page title will display the text “example search” instead of the previously incorrect value of “%searchphrase%”.

Thanks for reading, and I hope this short article helps you to improve your analytics reporting, allowing you to analyse the data better, and helping you improve the content offering your visitors are searching for.

Leave a comment