What is the best way to represent closed days (holidays) using Schema.org vocabulary?

What is the best way to represent closed days (holidays) using Schema.org vocabulary? - Google Search Console is a free application that allows you to identify, troubleshoot, and resolve any issues that Google may encounter as it crawls and attempts to index your website in search results. If you’re not the most technical person in the world, some of the errors you’re likely to encounter there may leave you scratching your head. We wanted to make it a bit easier, so we put together this handy set of tips about google-search, microdata, schema.org, to guide you along the way. Read the discuss below, we share some tips to fix the issue about What is the best way to represent closed days (holidays) using Schema.org vocabulary?.Problem :


At this point in time there's no property in Schema.org that would allow a business to directly communicate holiday periods (e.g., Christmas) to Google bots and other web crawlers. There seems to be an open issue on Schema.org's GitHub repository however there's no telling when or if something will get added.



I have seen two solutions to this issue so far:






  1. Use openingHoursSpecification without opens and closes properties.



    <p property="openingHoursSpecification" typeof="OpeningHoursSpecification">
    Closed between <time datetime="2015-12-24" property="validFrom">24th of December</time> and <time datetime="2015-12-26" property="validThrough">26th of December</time>.
    </p>


    This seems like a nice solution but do we have any evidence that Google bots will properly understand this? It seems to validate in Google's Structured Data Testing Tool but does that mean that opens and closed properties are not required by Google?


  2. Use openingHoursSpecification with equal opens and closes properties.



    <p property="openingHoursSpecification" typeof="OpeningHoursSpecification">
    Closed between <time datetime="2015-12-24" property="validFrom">24th of December</time> and <time datetime="2015-12-26" property="validThrough">26th of December</time>.
    <meta content="00:00:00" property="opens" />
    <meta content="00:00:00" property="closes" />
    </p>


    Again a nice solution but there seems to be little to no evidence of web crawlers correctly understanding this and not treating this as incorrect markup. Also it seems a bit illogical to have to specify that a business is open for zero seconds.




The only other solution I can think of to use openingHoursSpecification with validFrom and validThrough properties to specify all time frames seperatly (even when the default opening hours are valid).



<div property="openingHoursSpecification" typeof="OpeningHoursSpecification">
<meta content="10:00:00" property="opens" />
<meta content="18:00:00" property="closes" />
<meta content="2015-12-23" property="validThrough" />
</div>
<p>
Closed between <time datetime="2015-12-24">24th of December</time> and <time datetime="2015-12-26">26th of December</time>.
</p>
<div property="openingHoursSpecification" typeof="OpeningHoursSpecification">
<meta content="10:00:00" property="opens" />
<meta content="18:00:00" property="closes" />
<meta content="2015-12-27" property="validFrom" />
</div>


Of course this solution is also flawed:




  1. It requires potentially a lot of duplicate markup.


  2. It relies heavily on using "invisible" meta elements instead of marking up visible data which is what Google recommends.




So which one of these solutions is best/least incorrect? Is there a better solution?


Solution :

As you said there is an open issue on schema.org for this, so you may be better attempting your own solutions and using trial-and-error to see if google picks it up correct. I would use solution 2. because it gives closed hours and seems clearest, this sounded similar to the suggested solution from the schema.org thread https://github.com/schemaorg/schemaorg/issues/240#issuecomment-95458846



The aren't an issue - machine readable dates are one of the exceptions when considering use of Non-visible and machine-radable data, according to google's policies this can include dates, prices, currencies, etc.



Although the official documentation from google states it may take months to pick up changes, I've found Fetch-As-Google and a 2-3 day wait at the most works for both microdata and JSON-LD, eg in the long list of comments on a schema.org microdata question you can see the original poster tries several different changes a few days apart with 3 days between the last change and google picking it up.



I would prefer this solution, because it avoids any redundance, is clear and valid:



<div itemscope itemtype="http://schema.org/Store">
<h1 itemprop="name">Middle of Nowhere Foods</h1>
<h2>Opening hours</h2>
<p>Normally open <time itemprop="openingHours" datetime="Mo,Tu,We,Th,Fr,Sa,Su 09:00-14:00">daily 9am-2pm</time> except on:</p>
<ul>
<li itemprop="openingHoursSpecification" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
<span itemprop="validFrom" content="2013-12-24">24 December 2013</span> and
<span itemprop="validThrough" content="2013-12-25">25 December 2013</span>:
<span itemprop="opens" content="09:00">9am</span>-<span itemprop="closes" content="11:00">11am</span></li>
<li itemprop="openingHoursSpecification" itemscope itemtype="http://schema.org/OpeningHoursSpecification">
<span itemprop="validFrom" content="2014-01-01">1st January 2014</span>
<span itemprop="validThrough" content="2014-01-01"></span>:
<span itemprop="opens" content="12:00">Noon</span>-<span itemprop="closes" content="14:00">2pm</span></li>
</ul>
</div>

If the issue about google-search, microdata, schema.org, is resolved, there’s a good chance that your content will get indexed and you’ll start to show up in Google search results. This means a greater chance to drive organic search traffic to your site.

Comments

Popular posts from this blog

Years after news site changed name, Google is appending the old name to search titles and news stories

Is it possible to outrank Google for a search term on their own search engine?

Load Wikipedia sourced biographies via Ajax or render it with the rest of the page as part of the initial request?