indie-blogs-bg

Sitelinks Search Box Schema

Sitelinks Search Box Schema featured image
22 Oct 2020
Nirlep Patel
Structured Data

With the help of a site links search box, you can search through a website or an app instantly via the search page results. The site links search box is nothing but a website-specific search box. It is a website or an app’s very own Search toolbar. The feature is Google Powered. It pops up automatically by Google Search, you do not have to do anything additional for making it happen. 

What you can do is provide information via adding the Website structured data for Google to understand your website better.

PRO TIP: Google does not guarantee for sitelinks search box for appearing on search results. Also, it is not guaranteed that websites or apps using the search box markup will display the sitelinks search box.

HOW DO I IMPLEMENT SITELINKS SEARCH BOX TO MY WEBSITE/ APP?

For sitelinks search box being eligible to appear on your website/app, follow the below-listed steps:

  1. Ensure to Install A working Search Engine on your website or Android App.

 

    • Website: Make sure to set up a search engine for your website. The feature helps forward the user’s query to your target by using the specified syntax in the structured data. Your search engine must support UTF-8 Encoded queries.
    • Apps: Check out the search overview on Android Developer for knowing how to implement a search engine box on your app. Your android must support an Action_View intent from search results, corresponding to the data URL specified in your markup’s potentialAction.target property.

 

  1. For implementing the Website structured data entity on your website homepage:

For using the feature, an app must have an associated website, even if it is a single-page website. Follow the additional guidelines:

    •  Add the markup only to the homepage, not other pages.
    •  Ensure to specify one SearchAction for the website and others if supporting apps. A website must have a SearchAction even if the app is the preferred search target. It ensures the search result directs to your website, despite the users not searching from an android phone or an installed android app.
  1. Verify the structured data using the Rich Results Test.
  2. Ensure to verify the search engine implementation by copying the Website.potentialAction.target URL via your structured data that replaces the {search_term_string} with a test query and browses to that URL in the said web browser.
  3. Make sure to set a preferred canonical URL for your domain’s homepage by using the rel= ‘canonical’ link element on all homepage variants. It helps Google choose the correct URL for the markup. Your server must support UTF-8 character encoding.
  4. When working with Apps, enable proper intent filters for supporting the URL you specify in the app markup target. Check out Firebase App Indexing for Android for knowing how to create intent filters for Google Search.

WHAT ARE THE GUIDELINES TO FOLLOW?

Follow the Webmaster Guidelines and General Structured Data Guidelines for making your site eligible to appear as a search result.

Check out the earlier posts of the series to know more about the general structured data guidelines.

HOW DO I PREVENT A SITELINKS SEARCH BOX FROM APPEARING ON MY WEBSITE?

 Add the below-listed metadata to your homepage for preventing sitelinks search box:

<meta name=”Google” content=”nositelinksearchbox” />

WHAT ARE THE VARIOUS PROPERTIES OF THE MARKUP?

  1. Website: the entity holds the said website.
  2.  PotentialAction: The entity holds the URL for sending the query to, and the syntax of the sent query. Ensure to implement a webpage or intent handler that can receive the said request and perform an appropriate search on the submitted site. For users not using an Android App, the search box will send the website query version to the specified location. For users on Android devices having a specified android intent URL, the said URL will be sent.

Ensure to create a website SearchAction for enabling the desktop search case. You can specify a SearchAction object for your app if supporting app search. Every SearchAction object has the following actions:

    • potentialAction.@type
    • potentialAction.query-input
    • potentialAction.target
  1. PotentialAction.query-input: Ensure to use the literal string required name= search_term_string, or any placeholder used in the target.

      4.PotentialAction. Target : A string in the said format : search_handler_uri { search_term_string}.

    •  Search_handler_uri: For websites, the said URL handler must receive and handle all search queries. For apps, the URL of the said intent handler for your search engine that handles search queries.
    •  Search_term_string: The said placeholder string that replaces the user’s search query once the user “clicks” the search button in the box.
  1. URL: Specify the URL of the said site that is searched. 

Set it to the canonical homepage of your website.

Refer to the previous posts of the Series to know in detail about Monitoring Rich Results with Search Console, Fixing Troubleshooting problems and Analyzing Traffic.