Skip to main content

Defining Your Page's Publishing Time for AddSearch

AddSearch supports filtering and sorting search results based on the publishing date of your web pages. To enable this, specify the publishing date on each page so AddSearch can index and use this information.

If you do not define a publishing date, AddSearch uses the time when the page was added to the search index as a fallback.

How to Set the Publishing Date

AddSearch recognizes publishing dates through HTML meta tags or time elements embedded in your pages. Use one or both of the following methods:

1. Using the article:published_time Meta Tag

Add a meta tag inside the <head> section of your HTML page. Use the property name article:published_time with the date value in ISO 8601 format.

Example:

<head>
<meta property="article:published_time" content="2019-07-31T10:30:45+00:00" />
<!-- other head elements -->
</head>

This method clearly communicates the publishing date to crawlers and search engines.

2. Using the time Element

Alternatively, include a <time> element anywhere in the page content that describes the publishing date. The datetime attribute must contain the date/time in ISO 8601 format.

Example:

<p>Published on <time datetime="2019-11-15T07:35:00+00:00" pubdate>November 15th 2019 at 7:35 am</time></p>

If the page includes multiple <time> tags, AddSearch prioritizes the one with the pubdate attribute.

Next Steps

Once your pages include publishing dates, you can configure search widgets and results pages to allow sorting and filtering by date. See these guides for setup details:

You can also enhance relevance with Date Boost, which prioritizes newer content in your search results.


Define the publishing date on your web pages using meta tags or time elements to enable date-based sorting and filtering in AddSearch search results.