Cookies setting

Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy

Cookie Policy
Essential cookies

These cookies are strictly necessary for the site to work and may not be disabled.

Information
Always enabled
Advertising cookies

Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.

Information
Analytics cookies

Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.

Information
mageplaza.com

How to Make Sitelinks Search Box in Magento 2?

3 days ago

How to make sitelinks search box? How to make sitelinks search box?

The Most Popular Extension Builder for Magento 2

With a big catalog of 224+ extensions for your online store

Several years ago, Google introduced the Sitelinks Search Box. Sitelinks Search Box is a search box above Sitelinks, introduced and implemented by Google to help users search content on your site more directly and easily. When enabled, this search box will appear below the main search result from a certain brand. So, after searching for a brand in Google, you can directly use the search engine of the online store or website where you want to search for something. Results will be displayed on the search results page of the relevant page.

Here is an example search result for “Youtube” on Google that returns a sitelinks search box for the youtube site:

sample sitelinks search box

With the Google Sitelinks search box, people can reach your content more quickly from search results. Searchers sometimes also use navigation queries - enter the brand name or URL of a web page to create a more detailed query on the site. For example, someone wants to search for a guilty dog video on YouTube. They type YouTube or you-tube or youtube.com into Google Search, follow the link to YouTube, and then search for a dog video.

Sitelinks search box removes the steps: Query for youtube displays a specific sitelinks search box in the sitelinks, so users can immediately search for guilty dog videos without having to click through the site.

It is not difficult to make your site be eligible for a Sitelink Search box. This process includes three steps and takes care of the technical side. So you should be patient and implement the following steps:

1. Install a search engine to work on your site

Queries from Sitelinks Search Box direct users to the search results pages on your site, so you will need to have the functionality of a search engine to enable this feature. If your site does not have search engines, you can set up with Google Custom Search Engine or use any search engine you like.

2. Add schema.org markup on your homepage

Another very simple step, put the following code in the source code of the homepage, edit the “URL” and “target” fields to match your site’s information.

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "WebSite",
  "url": "https://www.example.com/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "https://query.example.com/search?q={search_term_string}",
    "query-input": "required name=search_term_string"
  }
}
</script>

“Url” - this is an attribute that specifies the URL of the web page. It must match the canonical URL of your domain’s home page. PotentialAction:target: This attribute specifies a URL search type for sending queries to the site’s search engine. Query-input - the value for the query-input attribute name must match the string enclosed in curly brackets in the target property of the potentialAction.

3. Set up a preferred canonical URL for your homepage

You need to use the rel="canonical" link factor on all variants of the homepage. This helps Google Search choose the correct URL for your markup.

When you have completed all of this and Google considers your site is eligible. Actually, Sitelinks Search Box will display on your site.

There is a way if you do not want to display the Sitelink search box on the SERPs, you can add the following tag to the source:

<meta name="google" content="nositelinksearchbox" />

From that, the Sitelinks search box will be disabled like a part of Googlebot crawling and processing of the page.

Conclusion

Making Sitelinks Search Box is not difficult. Now it is high time to learn how to make a sitelink search box to differentiate and attract customers. Besides that, having a Sitelink Search Box can help increase the traffics to your website.

Table of content


    Related Post

    Website Support
    & Maintenance Services

    Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

    Get Started
    mageplaza services