summaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2023-12-17 18:49:38 +0000
committerGreg Roach <greg@subaqua.co.uk>2023-12-19 12:05:31 +0000
commite96e110d1e1c5e1d8eac6806f311b102a73c1907 (patch)
tree01596700014d31cd10b4be98440e7032be509738 /resources
parentcf522edfff4aba740a1a976bbcd7658f6770a7d2 (diff)
downloadwebtrees-e96e110d1e1c5e1d8eac6806f311b102a73c1907.tar.gz
webtrees-e96e110d1e1c5e1d8eac6806f311b102a73c1907.tar.bz2
webtrees-e96e110d1e1c5e1d8eac6806f311b102a73c1907.zip
Update robots.txt for robots that ignore rel=nofollow
Diffstat (limited to 'resources')
-rw-r--r--resources/views/robots-txt.phtml24
1 files changed, 20 insertions, 4 deletions
diff --git a/resources/views/robots-txt.phtml b/resources/views/robots-txt.phtml
index 8c68bad6fb..51eebe1ca4 100644
--- a/resources/views/robots-txt.phtml
+++ b/resources/views/robots-txt.phtml
@@ -3,10 +3,11 @@
declare(strict_types=1);
/**
- * @var array<string> $bad_user_agents
- * @var string $base_path
- * @var string $base_url
- * @var string $sitemap_url
+ * @var array<string> $bad_user_agents
+ * @var string $base_path
+ * @var string $base_url
+ * @var string $sitemap_url
+ * @var iterable<string> $trees
*/
?>
@@ -27,6 +28,21 @@ Disallow: <?= $base_path ?>/admin
Disallow: <?= $base_path ?>/manager
Disallow: <?= $base_path ?>/editor
Disallow: <?= $base_path ?>/account
+<?php foreach ($trees as $tree) : ?>
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/ancestors
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/calendar
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/compact
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/descendants
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/family-book
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/family-list
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/fan-chart
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/hourglass
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/individual-list
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/lifespans
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/pedigree
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/report
+Disallow <?= $base_path ?>/tree/<?= $tree ?>/timeline
+<?php endforeach ?>
Crawl-delay: 10
<?php if ($sitemap_url !== '') : ?>