> WebSite JSON-LD Sample Code
Sample JSON-LD code snippet with simple and with search examples, for use on basically any website used to identify meta information about your website.
- published
- modified
- size
- 0.4K
- path
- /website/
Last updated October 3, 2019 by Patrick Coombe
Don’t confuse this with the webPage type. I’ve included 2 very popular and standard examples. If you are new to structured data or JSON-LD here is a quick way to get started.
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "My Website Name",
"url": "https://example.com",
}
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "Site name",
"url": "https://example.com",
"sameAs": ["https://facebook.com/mypage",
"https://instagram.com/site",
"https://twitter.com/name"],
"potentialAction": {
"@type": "SearchAction",
"target": "http://example.com/pages/search_results?q={search_term}",
"query-input": "required name=search_term"
}
}