How to deal with empty dateModified schema field
It took me too long to find out what to do with the
dateModified structured data value when the page has not been modified at all yet. Here's what I found.
There are three ways to deal with it, but only two of them can be recommended:
- Remove it from the structured data entirely: this is a fine way to do it.
- Provide an empty value (such as
dateModified = " "): not recommended, as it could break services that have not been made to deal with empty values. Bad practice.
- Use the same value as what
datePublishedhas: this is a fine way to do it as well. Google will understand what you mean with it.
It comes down to one question: do you count page publishing as page modification? I probably wouldn't, but for an example Windows does when you create a file. If you go to the file properties on Windows, you will see the that on newly created files the creation and modification times are identical.
Whichever option you choose (should be either 1 or 3), you have one thing to remember with it: be consistent. If one page has no
dateModified at all and another page has the same
dateModified value as what the
datePublished value is, Google and other services won't be sure about what you mean with them.