WebmasterID logoWebmasterID
Robots & crawl control

AdSense and Mediapartners-Google in robots.txt

Mediapartners-Google is the crawler Google AdSense uses to read your pages so it can serve relevant ads. This page explains how it interacts with robots.txt, why blocking it can hurt ad targeting, and the exact rule if you have a reason to disallow it.

Verified against primary sources

What Mediapartners-Google does

AdSense uses the Mediapartners-Google crawler to analyse the content of pages showing AdSense ads so it can serve contextually relevant ads. If you block it, AdSense cannot read those pages, which can reduce ad relevance on them.

This crawler is separate from Googlebot. Allowing or blocking Mediapartners-Google does not change Search indexing, and blocking Googlebot does not by itself control AdSense crawling — they are different tokens.

If you must disallow it

To stop AdSense from crawling a section, target the token in its own group:

User-agent: Mediapartners-Google Disallow: /private/

Google documents that Mediapartners-Google honours its own robots.txt group. Keep the rule scoped to the paths you truly want excluded, since a site-wide Disallow degrades ad targeting everywhere AdSense runs.

How it appears in analytics and logs

Mediapartners-Google hits mean the AdSense crawler is reading a page to match ads to its content. It is not Search indexing and not a human visit.

Diagnostic use case

Decide whether to allow Mediapartners-Google on AdSense pages (for relevant ads) or disallow it on sections that should not be analysed for ad content.

What WebmasterID can help detect

WebmasterID classifies Mediapartners-Google as a Google bot distinct from Googlebot, so you can confirm AdSense crawling and keep it out of human analytics.

Common mistakes

Privacy and accuracy notes

The rule matches the Mediapartners-Google token only. It concerns ad crawling of your own pages, not visitor data, and robots.txt is a request to compliant crawlers.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.