MgidBot user agent
Operated by MGID
MgidBot is the crawler of MGID, a native advertising network.
The MgidBot bot at a glance
- MgidBot is operated by MGID and checks landing pages for an advertising platform.
- The robots.txt token for MgidBot is MgidBot.
- Blocking a platform fetcher has no effect on organic search rankings.
- MgidBot robots.txt support: Not documented.
- Recommendation for Generative Engine Optimization (GEO): Your choice.
What is MgidBot?
MgidBot reads publisher and advertiser pages for MGID’s ad network.
Publishers that use MGID should allow it.
Should you block MgidBot?
Blocking MgidBot is a business decision: it protects your content but can lower how well AI products know your brand.
| Effect on search rankings | Blocking a platform fetcher has no effect on organic search rankings. |
|---|---|
| Effect on AI visibility | Blocking breaks the feature the fetcher serves, such as ad approval or feed updates. |
| Follows robots.txt | Not documented |
| Recommendation | Your choice |
How to block or allow MgidBot
Put the robots.txt rule in the file at the root of every domain and subdomain, for example https://example.com/robots.txt. The token MgidBot is matched case-insensitively. robots.txt alone may not stop MgidBot, so add the Nginx, Apache or Cloudflare rule as well.
robots.txt: block
# Block MgidBot
User-agent: MgidBot
Disallow: /robots.txt: allow
# Allow MgidBot
User-agent: MgidBot
Allow: /robots.txt: partial
# Keep MgidBot out of private areas only
User-agent: MgidBot
Disallow: /wp-admin/
Disallow: /cart/
Disallow: /checkout/
Disallow: /my-account/
Allow: /Nginx
# Nginx: return 403 to MgidBot
if ($http_user_agent ~* "(MgidBot)") {
return 403;
}Apache
# Apache .htaccess: return 403 to MgidBot
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (MgidBot) [NC]
RewriteRule .* - [F,L]Cloudflare WAF
# Cloudflare > Security > WAF > Custom rule, action: Block
(http.user_agent contains "MgidBot")How to verify real MgidBot traffic
MGID publishes no IP list or reverse DNS pattern for MgidBot, so the user agent cannot be verified. Anyone can send the same string. Rate-limit unusual volume instead of trusting the name.
How to find MgidBot in your server logs
Search the web server access log for the token. The command below counts MgidBot requests per URL on Nginx or Apache.
grep -i "MgidBot" access.log | awk '{print $7}' | sort | uniq -c | sort -rn | head -20For a full report per AI bot, upload the log to the AI Log File Analyzer, a free tool by Justin Hà.
MgidBot user agent string
The full user agent MGID publishes for MgidBot. Version numbers such as Chrome/W.X.Y.Z change over time, so match the token, not the whole string.
MgidBot 1.0MgidBot FAQ
MgidBot identifies itself with the robots.txt token "MgidBot". A typical request header reads: MgidBot 1.0
MGID has not documented how MgidBot treats robots.txt. Add a robots.txt rule and back it with a server rule if the traffic matters to you.
Blocking a platform fetcher has no effect on organic search rankings. Blocking breaks the feature the fetcher serves, such as ad approval or feed updates.
Add two lines to the robots.txt file at the root of each domain and subdomain: "User-agent: MgidBot" followed by "Disallow: /". The token is case-insensitive. Changes can take up to 24 hours to be picked up.
Not reliably. MGID publishes no IP list or reverse DNS pattern for MgidBot, so anyone can send the same user agent. Rate-limit unusual volume instead of trusting the name.
Search your server access log for "MgidBot", for example with: grep -i "MgidBot" access.log. The AI Log File Analyzer by Justin Hà counts visits per AI bot from an uploaded log file.
Sources: Public bot registry. Last reviewed by Justin Hà.
See which of these bots actually reach your website
The AI Log File Analyzer by Justin Hà counts visits from GPTBot, ClaudeBot, PerplexityBot and other AI crawlers in your server log, for free. The GEO Technical Package sets up robots.txt, llms.txt and crawler access for AI search.