How does Google treat webpages with multiple JSON-LD Schema.org blocks?












2















How do search engines like Google treat webpages with multiple JSON-LD (Schema.org) blocks?



For example, what would happen if a page has both non-conflicting script blocks below?



<script type="application/ld+json">
{ "@context":"http://schema.org",
"@type":"WebPage",
"@id": "#123",
"author": {
"@type": "Person",
"name": "Foo Bar"
}
}
</script>
<script type="application/ld+json">
{ "@context":"http://schema.org",
"@type":"WebPage",
"@id": "#123",
"text": "blah blah blah",
"url":"pageurl"
}
</script>









share|improve this question





























    2















    How do search engines like Google treat webpages with multiple JSON-LD (Schema.org) blocks?



    For example, what would happen if a page has both non-conflicting script blocks below?



    <script type="application/ld+json">
    { "@context":"http://schema.org",
    "@type":"WebPage",
    "@id": "#123",
    "author": {
    "@type": "Person",
    "name": "Foo Bar"
    }
    }
    </script>
    <script type="application/ld+json">
    { "@context":"http://schema.org",
    "@type":"WebPage",
    "@id": "#123",
    "text": "blah blah blah",
    "url":"pageurl"
    }
    </script>









    share|improve this question



























      2












      2








      2








      How do search engines like Google treat webpages with multiple JSON-LD (Schema.org) blocks?



      For example, what would happen if a page has both non-conflicting script blocks below?



      <script type="application/ld+json">
      { "@context":"http://schema.org",
      "@type":"WebPage",
      "@id": "#123",
      "author": {
      "@type": "Person",
      "name": "Foo Bar"
      }
      }
      </script>
      <script type="application/ld+json">
      { "@context":"http://schema.org",
      "@type":"WebPage",
      "@id": "#123",
      "text": "blah blah blah",
      "url":"pageurl"
      }
      </script>









      share|improve this question
















      How do search engines like Google treat webpages with multiple JSON-LD (Schema.org) blocks?



      For example, what would happen if a page has both non-conflicting script blocks below?



      <script type="application/ld+json">
      { "@context":"http://schema.org",
      "@type":"WebPage",
      "@id": "#123",
      "author": {
      "@type": "Person",
      "name": "Foo Bar"
      }
      }
      </script>
      <script type="application/ld+json">
      { "@context":"http://schema.org",
      "@type":"WebPage",
      "@id": "#123",
      "text": "blah blah blah",
      "url":"pageurl"
      }
      </script>






      schema.org json-ld google-rich-snippets






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 28 '18 at 13:29









      unor

      67.6k17145252




      67.6k17145252










      asked Nov 28 '18 at 0:25









      Uppercase BrandsUppercase Brands

      447




      447
























          1 Answer
          1






          active

          oldest

          votes


















          1














          We can’t know how Google Search actually treats them, but we can know how Google’s Structured Data Testing Tool handles such a case.



          Same URI



          If objects have the same URI (in JSON-LD: @id), they are the same. Google’s SDTT will display one entry showing properties from all objects with the same URI. So judging from the output in SDTT, Google seems to treat these two cases equally:



          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl",
          "text": "blah blah blah"
          }
          </script>


          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl"
          }
          </script>
          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "text": "blah blah blah"
          }
          </script>


          Output in Google’s SDTT



          Different (or no) URI



          The default assumption is that the objects describe different things. However, if certain (typically unique) properties have the same values (telephone, address, name etc.), a consumer like Google Search might deduce that the objects describe the same thing -- this is not standardized, though, and if/when consumers do this is not documented.






          share|improve this answer
























          • From experience, Googlebot also does the merging when ids match. We've quite often set up ids to resolve duplicate entities, and it has improved rich snippets. e.g. price and review stars showing when they are defined in different scripts.

            – Tony McCreath
            Dec 5 '18 at 12:18











          • @TonyMcCreath: Do you mean the HTML id attribute? If yes, I know that Google’s SDTT is (I think) bugged in the way that it generates a (wrong) URI from this attribute -- but this should only affect Microdata/RDFa, not JSON-LD. Or am I missing something?

            – unor
            Dec 5 '18 at 14:06











          • In microdata its an itemid attribute. In json-ld its "@id". If they are not present then the SDTT makes them up from the url and maybe a related id attribute (if I recall correctly).

            – Tony McCreath
            Dec 6 '18 at 15:10











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53510304%2fhow-does-google-treat-webpages-with-multiple-json-ld-schema-org-blocks%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          We can’t know how Google Search actually treats them, but we can know how Google’s Structured Data Testing Tool handles such a case.



          Same URI



          If objects have the same URI (in JSON-LD: @id), they are the same. Google’s SDTT will display one entry showing properties from all objects with the same URI. So judging from the output in SDTT, Google seems to treat these two cases equally:



          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl",
          "text": "blah blah blah"
          }
          </script>


          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl"
          }
          </script>
          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "text": "blah blah blah"
          }
          </script>


          Output in Google’s SDTT



          Different (or no) URI



          The default assumption is that the objects describe different things. However, if certain (typically unique) properties have the same values (telephone, address, name etc.), a consumer like Google Search might deduce that the objects describe the same thing -- this is not standardized, though, and if/when consumers do this is not documented.






          share|improve this answer
























          • From experience, Googlebot also does the merging when ids match. We've quite often set up ids to resolve duplicate entities, and it has improved rich snippets. e.g. price and review stars showing when they are defined in different scripts.

            – Tony McCreath
            Dec 5 '18 at 12:18











          • @TonyMcCreath: Do you mean the HTML id attribute? If yes, I know that Google’s SDTT is (I think) bugged in the way that it generates a (wrong) URI from this attribute -- but this should only affect Microdata/RDFa, not JSON-LD. Or am I missing something?

            – unor
            Dec 5 '18 at 14:06











          • In microdata its an itemid attribute. In json-ld its "@id". If they are not present then the SDTT makes them up from the url and maybe a related id attribute (if I recall correctly).

            – Tony McCreath
            Dec 6 '18 at 15:10
















          1














          We can’t know how Google Search actually treats them, but we can know how Google’s Structured Data Testing Tool handles such a case.



          Same URI



          If objects have the same URI (in JSON-LD: @id), they are the same. Google’s SDTT will display one entry showing properties from all objects with the same URI. So judging from the output in SDTT, Google seems to treat these two cases equally:



          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl",
          "text": "blah blah blah"
          }
          </script>


          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl"
          }
          </script>
          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "text": "blah blah blah"
          }
          </script>


          Output in Google’s SDTT



          Different (or no) URI



          The default assumption is that the objects describe different things. However, if certain (typically unique) properties have the same values (telephone, address, name etc.), a consumer like Google Search might deduce that the objects describe the same thing -- this is not standardized, though, and if/when consumers do this is not documented.






          share|improve this answer
























          • From experience, Googlebot also does the merging when ids match. We've quite often set up ids to resolve duplicate entities, and it has improved rich snippets. e.g. price and review stars showing when they are defined in different scripts.

            – Tony McCreath
            Dec 5 '18 at 12:18











          • @TonyMcCreath: Do you mean the HTML id attribute? If yes, I know that Google’s SDTT is (I think) bugged in the way that it generates a (wrong) URI from this attribute -- but this should only affect Microdata/RDFa, not JSON-LD. Or am I missing something?

            – unor
            Dec 5 '18 at 14:06











          • In microdata its an itemid attribute. In json-ld its "@id". If they are not present then the SDTT makes them up from the url and maybe a related id attribute (if I recall correctly).

            – Tony McCreath
            Dec 6 '18 at 15:10














          1












          1








          1







          We can’t know how Google Search actually treats them, but we can know how Google’s Structured Data Testing Tool handles such a case.



          Same URI



          If objects have the same URI (in JSON-LD: @id), they are the same. Google’s SDTT will display one entry showing properties from all objects with the same URI. So judging from the output in SDTT, Google seems to treat these two cases equally:



          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl",
          "text": "blah blah blah"
          }
          </script>


          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl"
          }
          </script>
          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "text": "blah blah blah"
          }
          </script>


          Output in Google’s SDTT



          Different (or no) URI



          The default assumption is that the objects describe different things. However, if certain (typically unique) properties have the same values (telephone, address, name etc.), a consumer like Google Search might deduce that the objects describe the same thing -- this is not standardized, though, and if/when consumers do this is not documented.






          share|improve this answer













          We can’t know how Google Search actually treats them, but we can know how Google’s Structured Data Testing Tool handles such a case.



          Same URI



          If objects have the same URI (in JSON-LD: @id), they are the same. Google’s SDTT will display one entry showing properties from all objects with the same URI. So judging from the output in SDTT, Google seems to treat these two cases equally:



          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl",
          "text": "blah blah blah"
          }
          </script>


          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "url":"pageurl"
          }
          </script>
          <script type="application/ld+json">
          { "@context":"http://schema.org",
          "@type":"WebPage",
          "@id": "#123",
          "text": "blah blah blah"
          }
          </script>


          Output in Google’s SDTT



          Different (or no) URI



          The default assumption is that the objects describe different things. However, if certain (typically unique) properties have the same values (telephone, address, name etc.), a consumer like Google Search might deduce that the objects describe the same thing -- this is not standardized, though, and if/when consumers do this is not documented.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 28 '18 at 13:28









          unorunor

          67.6k17145252




          67.6k17145252













          • From experience, Googlebot also does the merging when ids match. We've quite often set up ids to resolve duplicate entities, and it has improved rich snippets. e.g. price and review stars showing when they are defined in different scripts.

            – Tony McCreath
            Dec 5 '18 at 12:18











          • @TonyMcCreath: Do you mean the HTML id attribute? If yes, I know that Google’s SDTT is (I think) bugged in the way that it generates a (wrong) URI from this attribute -- but this should only affect Microdata/RDFa, not JSON-LD. Or am I missing something?

            – unor
            Dec 5 '18 at 14:06











          • In microdata its an itemid attribute. In json-ld its "@id". If they are not present then the SDTT makes them up from the url and maybe a related id attribute (if I recall correctly).

            – Tony McCreath
            Dec 6 '18 at 15:10



















          • From experience, Googlebot also does the merging when ids match. We've quite often set up ids to resolve duplicate entities, and it has improved rich snippets. e.g. price and review stars showing when they are defined in different scripts.

            – Tony McCreath
            Dec 5 '18 at 12:18











          • @TonyMcCreath: Do you mean the HTML id attribute? If yes, I know that Google’s SDTT is (I think) bugged in the way that it generates a (wrong) URI from this attribute -- but this should only affect Microdata/RDFa, not JSON-LD. Or am I missing something?

            – unor
            Dec 5 '18 at 14:06











          • In microdata its an itemid attribute. In json-ld its "@id". If they are not present then the SDTT makes them up from the url and maybe a related id attribute (if I recall correctly).

            – Tony McCreath
            Dec 6 '18 at 15:10

















          From experience, Googlebot also does the merging when ids match. We've quite often set up ids to resolve duplicate entities, and it has improved rich snippets. e.g. price and review stars showing when they are defined in different scripts.

          – Tony McCreath
          Dec 5 '18 at 12:18





          From experience, Googlebot also does the merging when ids match. We've quite often set up ids to resolve duplicate entities, and it has improved rich snippets. e.g. price and review stars showing when they are defined in different scripts.

          – Tony McCreath
          Dec 5 '18 at 12:18













          @TonyMcCreath: Do you mean the HTML id attribute? If yes, I know that Google’s SDTT is (I think) bugged in the way that it generates a (wrong) URI from this attribute -- but this should only affect Microdata/RDFa, not JSON-LD. Or am I missing something?

          – unor
          Dec 5 '18 at 14:06





          @TonyMcCreath: Do you mean the HTML id attribute? If yes, I know that Google’s SDTT is (I think) bugged in the way that it generates a (wrong) URI from this attribute -- but this should only affect Microdata/RDFa, not JSON-LD. Or am I missing something?

          – unor
          Dec 5 '18 at 14:06













          In microdata its an itemid attribute. In json-ld its "@id". If they are not present then the SDTT makes them up from the url and maybe a related id attribute (if I recall correctly).

          – Tony McCreath
          Dec 6 '18 at 15:10





          In microdata its an itemid attribute. In json-ld its "@id". If they are not present then the SDTT makes them up from the url and maybe a related id attribute (if I recall correctly).

          – Tony McCreath
          Dec 6 '18 at 15:10




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53510304%2fhow-does-google-treat-webpages-with-multiple-json-ld-schema-org-blocks%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)