From fbcf98db96f4fd249b0f4892e04168ed57118f72 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 13 Dec 2021 03:32:16 -0600 Subject: [PATCH] seo: prevent crawling comment, show_seq links. * Mark /comments/:id links in comment timestamps as nofollow to prevent Googlebot from crawling these links. * Mark /posts/:id/show_seq links as disallowed in robots.txt to prevent Googlebot from crawling forward/back links on posts. --- app/components/comment_component/comment_component.html.erb | 2 +- app/views/robots/index.text.erb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/comment_component/comment_component.html.erb b/app/components/comment_component/comment_component.html.erb index 63494df20..f15e5dde1 100644 --- a/app/components/comment_component/comment_component.html.erb +++ b/app/components/comment_component/comment_component.html.erb @@ -24,7 +24,7 @@ <% end %> <% end %> - <%= link_to time_ago_in_words_tagged(comment.created_at), comment, class: "message-timestamp" %> + <%= link_to time_ago_in_words_tagged(comment.created_at), comment, class: "message-timestamp", rel: "nofollow" %>
diff --git a/app/views/robots/index.text.erb b/app/views/robots/index.text.erb index c5c47f58e..bd7e6781b 100644 --- a/app/views/robots/index.text.erb +++ b/app/views/robots/index.text.erb @@ -9,6 +9,7 @@ Disallow: /posts?tags=source:* Disallow: /posts?tags=ordfav:* Disallow: /posts?tags=approver:* Disallow: /posts/*/favorites +Disallow: /posts/*/show_seq* Disallow: <%= artist_urls_path %> Disallow: <%= artist_versions_path %>