The unavailable_after directive is a meta tag that allows you to tell search engines to stop showing a page in search results after a specific date and time. This can be a useful tool for managing time-sensitive content, but it can also cause SEO issues if used incorrectly. This guide will explain how to use the unavailable_after directive wisely.

Think of it as setting an expiration date for your content. For a broader look at how to control crawling and indexing, see our guide on the meta robots and directives category.

An illustration of a ticking clock, symbolizing the importance of fixing the unavailable_after directive.

When to Use the Unavailable_After Directive

As explained in Google’s own guide to robots meta tags, this directive is useful for:

  • Event Pages: For a conference or a webinar that has a specific end date.
  • Limited-Time Offers: For a sale or promotion that is only available for a short period.
  • News Articles: For breaking news that quickly becomes outdated.

A Step-by-Step Guide to Using the Directive Correctly

The goal is to use this directive strategically to manage your time-sensitive content. For more on this, check out this guide to the unavailable_after tag from RankSense.

Code Example: The Fix

<!-- Before: No expiration date --> <meta name="robots" content="index, follow"> <!-- After: Expires on January 31, 2025 at 3:30 PM Pacific Standard Time --> <meta name="robots" content="unavailable_after: 31 Jan 2025 15:30:00 PST"> 
  1. Identify Time-Sensitive Content: Find the pages on your site that have a clear expiration date.
  2. Add the Directive: Add the `unavailable_after` directive to the meta robots tag of the page, specifying the date and time in RFC 850 format.
  3. Remove the Page After Expiration: Once the page has expired, it’s a good practice to either remove it or redirect it to a relevant page.

Frequently Asked Questions

What is the unavailable_after directive?

The unavailable_after directive is a meta tag that tells search engines to stop showing a page in search results after a specific date and time. It’s useful for content that is only relevant for a short period, such as an event listing or a limited-time offer.

How does the unavailable_after directive affect SEO?

The unavailable_after directive can be a useful tool for managing your crawl budget and preventing outdated content from appearing in search results. However, if used incorrectly, it can cause your pages to be prematurely removed from the index, leading to a loss of organic traffic.

How do I use the unavailable_after directive correctly?

To use the unavailable_after directive correctly, you should only apply it to pages that have a clear expiration date. You should also make sure that the date and time are specified in the correct format (RFC 850). It’s a good practice to remove the tag or the page itself after the expiration date has passed.

Ready to fix your ticking time bombs? Start your Creeper audit today and see how you can improve your website’s directives.