01 · Operator
Who operates Mediapartners-Google
- Company
- Type
- Other bot
- Official docs
- developers.google.com
02 · Behavior
What Mediapartners-Google does
Mediapartners-Google crawls participating websites to deliver relevant advertisements. It affects AdSense and Google Ad Manager. It ignores the global (*) group in robots.txt and only follows rules that name it.
03 · Impact
Why Mediapartners-Google matters for your site
If you allow it
- Needed for relevant AdSense ads
- Affects ad revenue on monetized sites
If you block it
- No use if you do not run Google ads
- Adds crawl load
04 · Allow
How to allow Mediapartners-Google
robots.txt
User-agent: Mediapartners-Google
Allow: /
Cloudflare
# Security › WAF › Custom rules › Create rule
Expression: (http.user_agent contains "Mediapartners-Google")
Action: Skip › All Super Bot Fight Mode rules
# Also check Security › Bots: "Block AI bots" can block it regardless of robots.txt.
WordPress
# WordPress serves a virtual robots.txt. Edit it with your SEO plugin:
# Yoast: SEO › Tools › File editor · Rank Math: General Settings › Edit robots.txt
User-agent: Mediapartners-Google
Allow: /
nginx
# nginx serves every user agent by default.
# Make sure no rule like this blocks it:
# if ($http_user_agent ~* "Mediapartners\-Google") { return 403; }
Apache
# Apache serves every user agent by default.
# Make sure .htaccess has no rule like this:
# RewriteCond %{HTTP_USER_AGENT} Mediapartners\-Google [NC]
# RewriteRule .* - [F,L]
05 · Block
How to block Mediapartners-Google
Mediapartners-Google does not always follow robots.txt. Add a server or CDN rule if you need a hard block.
robots.txt
User-agent: Mediapartners-Google
Disallow: /
Cloudflare
# Security › WAF › Custom rules › Create rule
Expression: (http.user_agent contains "Mediapartners-Google")
Action: Block
WordPress
# WordPress serves a virtual robots.txt. Edit it with your SEO plugin:
# Yoast: SEO › Tools › File editor · Rank Math: General Settings › Edit robots.txt
User-agent: Mediapartners-Google
Disallow: /
nginx
# In your server { } block:
if ($http_user_agent ~* "Mediapartners\-Google") {
return 403;
}
Apache
# .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Mediapartners\-Google [NC]
RewriteRule .* - [F,L]
</IfModule>
06 · User agents
User agents we see for Mediapartners-Google
The user agent published by the operator:
Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7 (compatible; Mediapartners-Google/2.1; +http://www.google.com/bot.html)
07 · Verification
Is it really Mediapartners-Google?
Anyone can copy a user agent. Real Mediapartners-Google requests come from the IP ranges published at developers.google.com/static/crawling/ipranges/special-crawlers.json. A reverse DNS lookup of a real request resolves to google.com, and that hostname resolves back to the same IP.
FAQ
Questions about Mediapartners-Google
What is Mediapartners-Google?
It is Google's AdSense crawler. It visits participating sites to show relevant ads through AdSense and Google Ad Manager.
Does Mediapartners-Google obey robots.txt?
Partly. Google states it ignores the global (*) user agent, so you must name Mediapartners-Google to restrict it.
Does blocking Mediapartners-Google affect Google Search?
Google lists it as affecting ad products like AdSense and Ad Manager, not Search.
Last reviewed Oct 8, 2026