I am trying to implement Google sitelink on a website. I read Error: Page contains property "query-input" which is not part of the schema and few other articles.
I am using JSON LD format. Here is what it looks like...
[{
"@context" : "https://schema.org",
"@type" : "Organization",
"name" : "yrshaikh.com",
"url" : "https://www.yrshaikh.com/",
"logo" : "https://yrshaikh.com/smile.png",
"sameAs" : [
"https://www.facebook.com/yrshaikh",
"https://www.instagram.com/yrshaikh/",
"https://www.pinterest.com/yrshaikhdotcom/",
"https://www.youtube.com/user/yrshaikh",
"https://twitter.com/yrshaikh",
"https://plus.google.com/+yrshaikh",
"https://www.linkedin.com/company/yrshaikh",
"https://en.wikipedia.org/wiki/yrshaikh.com"
]
},
{
"@context":"https://schema.org",
"@type":"WebSite",
"name":"yrshaikh",
"alternateName":"yrshaikh.com",
"url":"https://www.yrshaikh.com/",
"potentialAction":{
"@type":"SearchAction",
"target":"https://www.yrshaikh.com/search.html?text={search_term_string}&pop=1766357",
"query-input":"required name=search_term_string"
}
}]
(pls ignore the domain name, have replaced the actual one with a dummy domain one - yrshaikh.com)
I do not have any <form>
tag on my homepage.
When I search for my domain on Google I do see a Sitelinks Searchbox, but when I enter a search term and search, it does not redirect to my target url with the search term, instead it searches in Google by whatever-search-term site:yrshaikh.com
.
I have also tested my JSON LD on Google's Structured Data Testing Tool and it looks good to me, no errors/warnings.
Also another point worth noting is that this search url is internally redirected to a different route based on the incoming keyword.
Please advice.