最近はApache(.htaccess)で拒否ることが多いですが、一応記載しておきます。
Apache(.htaccess)で迷惑Botクローラーなどのアクセスを拒否
megalodon.jpのウェブ魚拓をrobots.txtで拒否する
# Megalodon-block User-agent: Megalodon Disallow: /
# archivebot-block User-agent: archive.org_bot User-agent: ia_archiver Disallow: /
# Common Crawl User-agent: CCBot Disallow: /
# NICT User-agent: ICC-Crawler Disallow: /
# COMSYS User-agent: Researchscan Disallow: /
# Netcraft User-agent: NetcraftSurveyAgent Disallow: /
# Grapeshot User-agent: grapeshot Disallow:
# BuiltWith User-agent: BuiltWith Disallow: /
# AhrefsBot User-agent: AhrefsBot Disallow: /
# SEMrush User-agent: SemrushBot Disallow: /
# Steeler User-agent: Steeler Disallow: /
# Dotbot User-agent: dotbot Disallow: /
# Majestic User-agent: MJ12bot Disallow: /
# Serpstat User-agent: serpstatbot Disallow: /
# SEOkicks User-agent: SEOkicks Disallow: /
# Barkrowler User-agent: barkrowler Disallow: /
# BLEXBot User-agent: BLEXBot Disallow: /
# MegaIndex User-agent: MegaIndex Disallow: /
# proximic User-agent: proximic Disallow: /
自分のサイトのコンテンツがピンされるのを防ぐ方法 Pinterest ヘルプ
# Pinterestbot user-agent: Pinterestbot disallow: /
動作確認
後日アクセスログを確認して「拒否したBotが403(Forbiddenエラー)」になっていれば設定OK です。