Introduction#
To begin with: Initially, I didn't understand and thought that writing structured data could define the secondary menu displayed in search results. Later, I learned that this is not possible, as it is automatically generated by Google Search based on algorithms. Reference: Search Engine - How to Display Secondary Directory in Search Results Page?.
However, I also learned about the functionality of structured data, such as defining the interactive behavior of the search box in search results.
Observing Google Search results, one can find that some websites are always unique, such as YouTube, which surprisingly has a search box and a secondary navigation menu (automatically generated by Google Search), providing a perfect user experience.
This is thanks to structured data. Clearly, it allows websites to gain more visibility in search results and helps users understand the website's functionality more quickly.
According to statistics, webpages using structured data have a click-through rate that is over 25% higher than those without structured data.
Structured Data#
Description#
Google Search's structured data uses JSON-LD for description.
Finding Structured Data Suitable for Your Website#
Read the Structured Data Markup Supported by Google Search documentation to find the structured data types suitable for your website.
For example, the structured data type for the YouTube homepage is the Sitelinks Search Box:
This is also applicable to my website, so I will use it for the subsequent introduction.
Sitelinks Search Box#
Note that the Sitelinks Search Box data structure can only specify the interactive behavior of the search box and cannot customize the secondary navigation menu, which is automatically generated by Google Search.
The above shows the page I was redirected to after entering "seo" in the YouTube search box and clicking the search button, which means there is no need to implement a search function within our website. Google, you are amazing! But make sure that all your public pages have been crawled and indexed by Googlebot on Google's servers. If not, you can diagnose this through Google's Search Console, and refer to my other notes for a quick start.
Of course, the behavior of the search box can be modified by adding structured data, such as redirecting to your specified internal search address after clicking the search button.
Where to Insert Structured Data on the Webpage#
Reference: Where to Insert Structured Data on the Webpage