How does a search engine retrieve the information contained in the websites on the network? Through “bots”.

Bots (short for “robot”, often also called “web robots”) are programs that, through complex algorithms, scan web pages, following one link after another, to retrieve all the information contained in the sites. This information is then processed and presented to users in search results and on social networks.

These algorithms have evolved enormously in recent years, and a bot is able to process the page from a semantic point of view too; that is, it can “understand” whether the page has only informational content or not, what topic it deals with, whether the page is part of an e-commerce site, etc.

Very often, however, it is necessary to guide the bots so that they can correctly retrieve the information from our web page. To do this, microdata is available.

What is microdata?

Microdata (or structured data) is a set of information that describes the content of our web page to the bot. This information is not visible to someone browsing the site in the “classic” way, that is, in the browser’s visual mode. It is written in the HTML code, and therefore in the part hidden from the visitor’s eye but easily found by the bot.

Let’s take the product page of an e-commerce site as a reference; through microdata we can indicate to the bot where the full and discounted prices are, what quantity of products is available, what the main image is, and so on.

All this information, if structured correctly, can help Google’s bot to create a more complete SERP result, or it can suggest to Meta’s bot where the correct information is to improve the “Shop” section of our Facebook page.

How does microdata work?

As mentioned earlier, microdata is present in the HTML source of our web page. This data is “invisible” additional information that is inserted at the point where the content of interest is located, and follows a specific syntax described by the schema.org website.

There are many types of information that can be tagged with microdata: e-commerce products, addresses of shops and local businesses, dates and places of events or concerts, real-estate listings, etc.

Depending on the information we want to identify, we should use one syntax rather than another, following the example given on the “schema.org” website.
You can insert microdata within the HTML tags or by using a kind of “summary” with the JSON-LD language.

For example, if on my site I want to tag the information about my business that is in the footer or on the contacts page, in the HTML source I will write code similar to this:

<div itemscope itemtype="https://schema.org/LocalBusiness">
    <h1><span itemprop="name">MY BUSINESS NAME</span></h1>
    <span itemprop="description">my business description</span>
    <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
      <span itemprop="streetAddress">My business street</span>
      <span itemprop="addressLocality">Modena</span>,
      <span itemprop="addressRegion">IT</span>
    </div>
    Phone: <span itemprop="telephone">123-456-789</span>
</div>

or I can add this snippet anywhere in the source code:

<script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "LocalBusiness",
      "address": {
        "@type": "PostalAddress",
        "addressLocality": "Modena",
        "addressRegion": "IT",
        "streetAddress": "My business street"
      },
      "description": "My business description.",
      "name": "MY BUSINESS NAME"
      "telephone": "123-456-789"
    }
</script>

Conclusion

Have you ever noticed that in some Google search results there is a little information right below the page description? For example, the “little stars” on the rating of a product from an e-commerce site. They are most likely information retrieved precisely from microdata. Having these small details makes the result more interesting and sets it apart from the others, increasing its chances of being “clicked”.

Inserting microdata into your site, therefore, is one of the “best practices” that adds more detailed information to our web pages.
It is not essential, but it improves the quality of our web page.

Massimo Rinaldi

Partner e Direttore creativo di Ventisette Digital. Comunica la sostenibilità before it was cool da oltre 15 anni. Prima dell'acquisto scellerato di Microsoft, ha collaborato con Nokia alla definizione di User Experience e User interface per alcune delle principali app italiane. IG @massimorinaldi27