Dumb SEO Questions

(Entry was posted by Valentina Huff on this post in the Dumb SEO Questions community on Facebook, 02/14/2015).

Iimplement schema code

Has anyone tried to implement schema for their website search engine and if so, what would you put in the schema code below? meta itemprop="target" content="https://query.example.com/search?q={search_term_string}" input itemprop="query-input" type="text" name="search_term_string" required

This is the example I got from schema.org/WebSite but not sure what to replace their examples with.?    
This question begins at 00:31:19 into the clip. Did this video clip play correctly? Watch this question on YouTube commencing at 00:31:19
Video would not load
I see YouTube error message
I see static
Video clip did not start at this question

YOUR ANSWERS

Selected answers from the Dumb SEO Questions Facebook & G+ community.

  • Valentina Huff: Has anyone tried to implement schema for their website search engine and if so, what would you put in the schema code below?

    <meta itemprop="target" content="https://query.example.com/search?q={search_term_string}"/>
     ;  ; <input itemprop="query-input" type="text" name="search_term_string" required/>

    This is the example I got from schema.org/WebSite but not sure what to replace their examples with.
  • Edwin Jonk: This code is used by Google to add a search box within the sitelinks. If Google will show that search box within their SERP's is unknown and relies on their algo's. ;

    However this specific code wouldn't work for Google. Namely it is missing a couple of things.

    First it needs to be wrapped into _itemtype="http://schema.org/WebSite"_ .
    Second it is missing which action, in this case it should be _itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction"_

    Therefore the microdata should look something like:

    <div itemscope itemtype="http://schema.org/WebSite">
     ; <meta itemprop="url" content="https://www.example.com/"/>
     ; <form itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
     ;  ; <meta itemprop="target" content="https://example.com/search?q={search_term_string}"/>
     ;  ; <input itemprop="query-input" type="text" name="search_term_string" required/>
     ;  ; <input type="submit"/>
     ; </form>
    </div>

    For this specific markup, Google is recommending ld+json instead of microdata [1]. However the current data testing tool from Google doesn't work for this. Therefore use the testing tool on Google Developers:
    https://developers.google.com/structured-data/testing-tool/

    [1] ;https://developers.google.com/structured-data/slsb-overview
  • Valentina Huff: Wow, thank you so much +Edwin Jonk ;for helping me out on this one. MOST appreciated! ;
  • Valentina Huff: +Edwin Jonk ;How long have you been doing SEO?

View original question in the Dumb SEO Questions community on Facebook, 02/14/2015).