diff --git a/robots-txt-cache.php b/robots-txt-cache.php new file mode 100644 index 0000000000000000000000000000000000000000..ef4a6aa49e57abab2230aee6dafcaa3b1b4d5d48 --- /dev/null +++ b/robots-txt-cache.php @@ -0,0 +1,14 @@ +<?php +/* + * Plugin Name: A/I - Robots.txt caching + * Description: Add cache-control headers to robots.txt + * Version: 0.0.1 + * Author: Autistici/Inventati + * Author URI: https://autistici.org + */ + +function ai_robots_txt_add_cache_headers() { + header("Cache-Control", "max-age=86400"); +} + +add_action('do_robotstxt', 'ai_robots_txt_add_cache_headers');