Informatics

Information about various topics

Ads Here

7.11.17

JSON-LD: How to Implement WebSite using JSON-LD Example



WebSite uses

WebSite is your domain.com. It is the only place it is supposed to be used, and by using it you get a very sweet perk in Google searches.
If you have a search bar on your site, schema.org/WebSite may give you a search bar in SERP's when people google your site.

Minimal Code Example

<script type="application/ld+json">{
"@context""http://schema.org",
"@type""WebSite",
"name": "Site name",
"url": "example.com",
}</script>
And that is it... The only thing this do it giving your site a name. Lets add some social media presence and that sweet search bar.

Advanced Code Example

<script type="application/ld+json">{
"@context""http://schema.org",
"@type""WebSite",
"name": "Site name",
"url": "http://example.com",
"sameAs": ["https://facebook.com/page", "https://plus.google.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"
}
}</script>
Now you told the search engines that this site is on those social media sites as well as telling them how your search mechanism works. You need to adapt it to your own internal search engine
The social media thing can prove to be more and more powerful for SEO, if you have people who use the pages. It shows your page is popular.

No comments:

Post a Comment