Schema.org Markup for Site Search Links

Schema.org Markup for Site Search Links

So I will be doing a list of posts all focusing on Schema.org, I have a variety of projects and sites built with Schema markup within the site’s theme so the Schema is pre baked and there is no code to add. For this site I have adopted another approach and I want to retro fit the schema manually so I can document cause and effect. Sounds nerdy right..

So Site search links are a new element which was released into the Google SERP in late 2014. The concept is to expose the search API of your site using a GET method and heap of shema markup in the header. This is real easy with WordPress and even if there is no search box you can always search with a simple GET statement like https://niallflynn.ca/?s=foo

So What do I Get if I add these Schema Tags?

Site-Search-You-TubeYou can see an example of a SERP listing to the right displaying a search box within the site links. The search box will appear for branded searches and Google are also reporting information relative to these new searches within GA which in theory gives you insight into your internal searches, but loads of tools can accurately track that within WordPress but for all the lowlier CMSes out there this could be data gold, who knows.

Jam This Code Into Your Theme/Site/CMS <head>

The bold bits need to be changed to your site, it is only needed on the home pagee;

<script type="application/ld+json">
{ "@context": "http://schema.org", "@type": "WebSite", "url": "https://niallflynn.ca/", "potentialAction": { "@type": "SearchAction", "target": "https://niallflynn.ca/?s={search_term}", "query-input": "required name=search_term" } }
</script>

If you need a WordPress specific example you can checkout the post on WordPressDeveloper.ie a similar post I wrote with a 100% WordPress focus. Anyway happy hunting, Google sent me an email for a few sites via GWT to prompt this and some sites just auto-magically get this so just hit and hope, but it should work within a matter of weeks.

Related Posts
Lifestyle Developments ( 18 Apr,2015 )

Leave Your Comment

Your Comment*

Your Name*
Your Webpage