How to block Yahoo Japan
Operated by Yahoo Japan Corporation. Yahoo Japan Advertising Bot
robots.txt
What the agent asks to be told. It obeys this or it does not — nothing enforces it.
User-agent: Yahoo Disallow: /
nginx
In the server block, then reload.
# In the server block. 403 rather than 444: a closed connection tells the
# operator nothing, and an agent that gets a status code can log it.
if ($http_user_agent ~* "(Y!J-ASR|Y!J-BRJ/YATS crawler|Y!J-BRU/VSIDX|Y!J-BRW|Y!J-BRY/YATSH crawler|Y!J-BRZ/YATSHA crawler|Y!J-B|YJ-SAD|Y!J-MMP/dscv|Y!J-WSC|YJ-SAD|Yahoo|J-DLC/|Yahoo Japan)") {
return 403;
}
Apache
In .htaccess or the vhost.
BrowserMatchNoCase "Y!J-ASR" bad_bot
BrowserMatchNoCase "Y!J-BRJ/YATS crawler" bad_bot
BrowserMatchNoCase "Y!J-BRU/VSIDX" bad_bot
BrowserMatchNoCase "Y!J-BRW" bad_bot
BrowserMatchNoCase "Y!J-BRY/YATSH crawler" bad_bot
BrowserMatchNoCase "Y!J-BRZ/YATSHA crawler" bad_bot
BrowserMatchNoCase "Y!J-B" bad_bot
BrowserMatchNoCase "Y!J-MMP/dscv" bad_bot
BrowserMatchNoCase "Y!J-WSC" bad_bot
BrowserMatchNoCase "YJ-SAD" bad_bot
BrowserMatchNoCase "Yahoo" bad_bot
BrowserMatchNoCase "J-DLC/" bad_bot
BrowserMatchNoCase "Yahoo Japan" bad_bot
<RequireAll>
Require all granted
Require not env bad_bot
</RequireAll>
Cloudflare
Security → WAF → Custom rules.
# Security → WAF → Custom rules, action: Block (http.user_agent contains "Y!J-ASR") or (http.user_agent contains "Y!J-BRJ/YATS crawler") or (http.user_agent contains "Y!J-BRU/VSIDX") or (http.user_agent contains "Y!J-BRW") or (http.user_agent contains "Y!J-BRY/YATSH crawler") or (http.user_agent contains "Y!J-BRZ/YATSHA crawler") or (http.user_agent contains "Y!J-B") or (http.user_agent contains "Y!J-MMP/dscv") or (http.user_agent contains "Y!J-WSC") or (http.user_agent contains "YJ-SAD") or (http.user_agent contains "Yahoo") or (http.user_agent contains "J-DLC/") or (http.user_agent contains "Yahoo Japan")
WordPress
A child theme's functions.php, or a small plugin.
// functions.php of a child theme, or a small plugin. Runs before WordPress
// builds the page, so a blocked agent costs one PHP process and no queries.
add_action('init', function () {
$agent = $_SERVER['HTTP_USER_AGENT'] ?? '';
foreach (['Y!J-ASR', 'Y!J-BRJ/YATS crawler', 'Y!J-BRU/VSIDX', 'Y!J-BRW', 'Y!J-BRY/YATSH crawler', 'Y!J-BRZ/YATSHA crawler', 'Y!J-B', 'Y!J-MMP/dscv', 'Y!J-WSC', 'YJ-SAD', 'Yahoo', 'J-DLC/', 'Yahoo Japan'] as $needle) {
if (stripos($agent, $needle) !== false) {
status_header(403);
exit('Blocked: Yahoo Japan');
}
}
});
robots.txt is a request. The rules below it are the wall.
Yahoo Japan publishes a token, so the directive above will work for as long as it keeps honouring it — and nothing except its own good manners makes it. The server rules match on a header the requester sets, which stops the agent that says who it is and not the one that copies somebody else's name. Botscope verifies identity against DNS and published address ranges, records which check decided each request, and shows you the ones that lied.