What is a Sitelinks Search Box? What Is It Used For?
What is a Sitelinks Search Box? What Is It Used For?
The Sitelinks Search Box is a widget/snippet that affects the Google search results of websites.
In other words, it is a tool shown under your site's title in search results that allows users to search for something without entering your site.
When users use this part, the search results are shown on your site, meaning the user is taken directly to your site.
As you can see in the photos above, when you search with the Sitelinks box, the query you searched for is made in the site's internal search box and presented to the user by the site. The only difference from the search box inside the site is that it is outside the site and located on Google.
How Do I Add a Sitelinks Search Box to My Site?
Now that we have provided information about what Sitelinks is, let's talk about how you can add it to your site.
There are 2 types of Sitelinks integration methods as Json-LD and Microdata on the schema.org site, you can go to schema.org and research to add Sitelinks to your site in more up-to-date ways. Don't forget, everything in software gets updated over time.
Adding a Sitelinks Search Box with JSON-LD
<script type=“application/ld+json”>
{
“@context”: “http://schema.org”,
“@type”: “WebSite”,
“url”: “http://www.urhoba.net.com/”,
“potentialAction”: {
“@type”: “SearchAction”,
“target”: “http://www.urhoba.net.com/search?&q={query}”,
“query-input”: “required”
}
}
</script>Adding a Sitelinks Search Box with Microdata
<div itemscope itemtype=“http://schema.org/WebSite”>
<link itemprop=“url” href=“http://www.example.com/”/>
<form itemprop=“potentialAction” itemscope itemtype=“http://schema.org/SearchAction”>
<meta itemprop=“target” content=“http://example.com/search?q={query}”/>
<input itemprop=“query-input” type=“text” name=“query”/>
<input type=“submit”/>
</form>
</div>It will be enough to put the above codes between the "<head></head>" tags of your site.
If you want to review more detailed explanations provided by Google, simply click here.
If you are not sure whether it works or if you receive any errors when you add it to your site, you can use the "rich results test" tool.
To go to the rich results test tool, click here .


Yorum Gönder