The discussion revolves around removing incorrect structured data from subpages and implementing the “Sitelinks Search Box” only on the homepage. Currently, the code is implemented on every page, category, and topic, telling Google that each page is the website homepage ("url":"https://www.example.com/"), which is incorrect for subpages.
As per Google’s documentation, the “WebSite” structured data element should only be implemented on the homepage. rrit highlights this issue and suggests either removing the application/ld+json data from every page except the homepage or declaring the correct page-individual data for each subpage.
TL;DR: Right now we are telling Google for every page, subpage, topic, whatsoever that the page itself has "url":"https://www.example.com/"
– this is definitely wrong for a topic page with url like https://meta.discourse.org/t/add-sitelinks-search-box-to-the-homepage-only/219299
The Sitelinks Search Box’ code is implemented on every page, category and topic right now:
Some more background on Googles: “Add [the search snippet application/ld+json data] markup only to the homepage, not to any other pages.”
This <script type='application/ld+json'> gives Google information on the content of the actual page/url it is defined on.
Right now we are telling Google for every page, subpage, topic, whatsoever that the page itself is:
"@type":"WebSite"
"url":"https://www.example.com/"
– this is definitely wrong for a topic page with url https://meta.discourse.org/t/add-sitelinks-search-box-to-the-homepage-only/219299
Either we should remove the application/ld+json data from every page except of the homepage.
Or we should declare for every subpage the correct page-individual application/ld+json data representing the content of that page.
Examples on how to correctly use application/ld+json data for List-pages e.g. “Carousel”