Rich Snippet Generator for

GoodRelations
E-Business and Web Science Research Group

GoodRelations is a powerful yet simple technique for putting rich data snippets about your business into your Web pages. This makes the unique features of your products and services more accessible for the latest generation of search engines (e.g. Yahoo SearchMonkey), novel mobile applications, and browser plug-ins. Plus, it brings positive effects on existing search engines.

With this tool, you can create such snippets using the W3C RDFa format for simple copy-and-paste. Just insert them into your Web pages and update the XHTML/HTML page header markup, as explained below.

It will pay out. It's simple. And BestBuy is already doing it with remarkable results.

en de

Step 1: Create rich snippet for your company

Legal name of your company
Country
City
Zip code
Street and number
Phone number proposed scheme: +49-0123-456789
URL of a logo or image e.g. http://www.example.com/image.(jpg|png|gif|svg)

Step 2: Create rich snippet for your shop or store

This step is necessary only if you maintain a shop or store location.

Name of store or location
Country
City
Zip code
Street and number
Phone number proposed scheme: +49-0123-456789
URL of a logo or image e.g. http://www.example.com/image.(jpg|png|gif|svg)
Geo position Latitude ()   Longitude ()  
Opening hours for Monday through Friday proposed scheme: 08:30
Closing hours for Monday through Friday proposed scheme: 16:00
Opening hours for Saturday proposed scheme: 08:30
Closing hours for Saturday proposed scheme: 12:00
Opening hours for Sunday proposed scheme: 08:30
Closing hours for Sunday proposed scheme: 12:00
Web page describing your company e.g. http://www.example.com/

If you would like to provide a more granular description of your opening hours, then you should consider customizing the gr:OpeningHoursSpecification code section according to your needs. See the GoodRelations Quickstart Guide for details.

If you have multiple shops, but just one page, simply create and copy the snippet multiple times and replace all ocurrences of the three elements (#store, #mon_fri, and #sat) inside the same snippet by (#store1, #mon_fri1, #sat1), (#store2, #mon_fri2, #sat2), etc.

Step 3: Create rich snippet for an individual product or service

GoodRelations is most effective if you publish individual data on your products and services. This is of particular relevance for dynamic Web shops with many items.

Name of the product
Description of the product
Language of the description select language code from ISO 639-1, e.g. "en" or "de"  
URL of the product detail page e.g. http://www.example.com/product/
URL of a product image e.g. http://www.example.com/image.(jpg|png|gif|svg)
EAN-13, 13-digit UPC, or 13-digit ISBN code for the product
Currency and price for product select 3-letter ISO 4217 currency code, e.g. "EUR" or "USD", and price for product  
Payment methods see predefined payment method individuals in GoodRelations

If you have multiple products within the same web page, simply create and copy the snippet multiple times and replace all ocurrences of the element #offer inside the same snippet by #offer1, #offer2, etc.

Step 4: Updating the XHTML/HTML page header

Once you will have inserted the snippets into the respective pages, you should indicate their existence to crawlers. That is also pretty easy:

Change the DOCTYPE in the header to "XHTML+RDFa":

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

Add a "xmlns" attribute with the value "http://www.w3.org/1999/xhtml" and a "version" attribute with the value "HTML+RDFa 1.0" to the <html> element of your document:

<html xmlns="http://www.w3.org/1999/xhtml" version="XHTML+RDFa 1.0" xml:lang="en">

Check that the <head> element includes the proper content type and encoding for XHTML:

<head>
    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
    <title>Your page title blabla...</title>
</head>

Additional resources

GoodRelations Quickstart Guide - explains the templates used in this tool

GoodRelations CookBook - more complex patterns for specific scenarios

GoodRelations Project Page - information about the underlying GoodRelations vocabulary

Developer: Alex Stolz

Disclaimer: This service is provided by the E-Business and Web Science Research Group at Universität der Bundeswehr München as it is with no explicit or implicit guarantees.