How unavailable_after and meta robots directives work
guide // , 5 min read, by Darthwares
Meta robots rules control how search engines index and serve individual web pages or files. The unavailable_after directive requests that search crawlers stop displaying a page in search results after a specified date and time. HTML pages use meta elements in their code, while non-HTML files use HTTP response headers to set these instructions. When conflicting rules appear across headers or HTML tags, search engines always apply the most restrictive directive.
On this page // 6 sections
The short version
- The unavailable_after directive tells crawlers not to show a page in search results after a specific date and time.
- HTML meta tags set crawling rules for web pages, while X-Robots-Tag HTTP headers set rules for non-HTML files like images and PDFs.
- Crawlers ignore indexing rules completely if a page is blocked from crawling inside the site robots.txt file.
- If search directives conflict across headers or meta tags, crawlers apply the most restrictive rule.
How does the unavailable_after directive work?
Google documents that the unavailable_after directive tells search crawlers not to display a page in search results after a specified date and time. Site owners use this instruction to automatically remove temporary content or expired offers from search listings without needing manual intervention.
MDN Web Docs explains that search crawlers are expected to considerably decrease the crawl rate of a URL after the specified date and time has passed. This reduction in crawl frequency helps search engines manage their crawling resources while keeping outdated content out of search listings.
If a page includes an invalid date or time format in the directive, search engines ignore the rule entirely. The page remains eligible for normal crawling and indexing until a valid date and time string is provided.
How do you implement search rules for HTML and non-HTML resources?
Meta tags are HTML elements that provide additional information about a web page to search engine crawlers and other software clients. Google documents that the meta robots tag allows site operators to use a granular, page-specific approach to control indexing and serving behavior for individual HTML pages.
A meta tag using name="robots" sets directives for all search engine crawlers that process the page. Site owners can also target specific crawlers by using target name attributes, such as using name="googlebot" to give directives exclusively to Google.
HTML meta tags cannot be placed inside non-HTML resources such as PDF documents, video files, or image files. MDN Web Docs notes that servers must use the X-Robots-Tag HTTP response header to define crawling and indexing rules for these non-HTML files. Search crawlers process the rules in the X-Robots-Tag header to adjust how images, media, and documents appear in search results.
What happens when search directives conflict?
Search engines follow strict precedence rules when multiple directives are declared for the same page or resource. Google documents that when conflicting robots rules exist, the more restrictive rule always applies to the crawl behavior.
Conflicts can occur between general robots directives and specific crawler rules, such as a conflict between a robots tag and a googlebot tag. In all cases, including conflicts within an X-Robots-Tag header or between an HTTP header and an HTML meta tag, crawlers default to the most restrictive directive.
Why are meta tags ignored if robots.txt blocks a page?
Search engine crawlers must fetch and read a resource to discover any meta tags or HTTP response headers attached to it. Google documents that if a page or media file is disallowed from crawling in the robots.txt file, crawlers never fetch the file payload.
Because the crawler cannot read the response, any indexing or serving rules defined inside HTML meta tags or X-Robots-Tag HTTP headers will not be detected. MDN Web Docs confirms that blocked pages will completely ignore any internal directives set to control search result appearance.
How do you diagnose search directive issues?
Diagnosing crawl and indexing issues requires checking permissions, header formatting, and rule precedence in order.
- 01Check the robots.txt file to confirm the target URL is not disallowed from crawling, ensuring search engine bots can fetch the response headers and page HTML.
- 02Inspect the HTTP response headers and HTML meta tags on the page to identify all declared crawler directives and check for invalid date formats.
- 03Evaluate overlapping rules between general robots tags, specific crawler tags, and X-Robots-Tag headers to ensure the most restrictive directive matches your intended serving outcome.
| Symptom | Potential Cause | Action to Take |
|---|---|---|
| Search engine ignores unavailable_after directive | The date and time string format is invalid | Format the date and time correctly so crawlers can parse it |
| Indexing rules in headers or meta tags have no effect | The URL path is disallowed in robots.txt | Remove the disallow rule in robots.txt to let crawlers fetch directives |
| Page behavior does not match the intended meta tag | A conflicting tag or header is more restrictive | Audit all meta tags and X-Robots-Tag headers to remove unintended restrictive rules |
Common questions
What is the main purpose of meta robots tags?
Google documents that meta tags are HTML elements that control search engine crawling and indexing. They give site owners granular, page-specific control over how individual HTML pages are indexed and served in search results.
How do you apply search rules to non-HTML files like PDFs or images?
To set crawling and indexing rules for non-HTML files like PDFs, images, or media files, servers send an X-Robots-Tag HTTP response header. Search crawlers read the header directives to adjust how those resources appear in search listings.
What happens if an unavailable_after tag contains an invalid date?
If no valid date and time is specified in the directive, search engines ignore the unavailable_after rule completely.
How does robots.txt impact meta tags and X-Robots-Tag headers?
If a resource is blocked from crawling through a robots.txt file, search crawlers cannot detect any indexing or serving rules in HTML meta tags or X-Robots-Tag HTTP headers, so those rules are ignored.
Which rule takes priority when search directives conflict?
When conflicting rules exist within meta tags, X-Robots-Tag response headers, or between HTML tags and HTTP headers, the more restrictive rule always applies.
Primary sources and further reading
This article was researched and written by an AI model and published automatically. It was written from sentences that were checked to appear on the pages below, but a person has not reviewed the text. If something is wrong, tell us at chibivikramathithan@darthwares.com and we will correct it.