Skip to content
24/7 support · 7-day money-back guarantee · Free plan, no card neededSee plans

Blog › Technical SEO ›

AI bots, scrapers and WordPress security: protecting your site without hurting search visibility

Cover image: AI bots, scrapers and WordPress security: protecting your site without hurting search visibility

Look at the traffic logs of almost any WordPress site and you will find that a large share of requests come from automated visitors rather than people. Some are welcome: Googlebot, Bingbot and other search engine crawlers that make your site discoverable. Some are useful but debatable: AI crawlers collecting content for training or search features. And some are harmful: scrapers copying content, bots probing for vulnerabilities, credential-stuffing attacks against login pages and spam bots filling forms and comments.

Contents of the guide: AI bots, scrapers and WordPress security: protecting your site without hurting search visibility
The main sections of this guide.

The growth of AI has added to the volume. New AI companies operate crawlers, many automated tools scrape content to feed models or generate competing pages, and some bots disguise themselves as legitimate crawlers. For site owners, the challenge is to protect server resources, content and security without accidentally blocking the search engines and AI assistants that bring visitors.

This guide explains the types of bots, how to identify them, how to manage them with robots.txt, server rules and security tools, how to protect WordPress specifically and how to avoid the common mistakes that hurt search visibility.

The bot landscape

It helps to group automated traffic by purpose.

Search engine crawlers, such as Googlebot and Bingbot, discover and index pages for search results. Blocking them removes your site from search.

AI crawlers and agents collect content for training models, power AI search features or fetch pages when users ask assistants questions. Policies on these vary by site.

SEO and monitoring tools crawl sites to analyze links, rankings and performance. Some are useful; others consume resources without benefit to you.

Scrapers copy content, prices or data, sometimes to republish it, train models or undercut competitors.

Vulnerability scanners probe for weaknesses, such as outdated plugins or exposed files.

Brute-force and credential-stuffing bots attempt to log in with guessed or stolen passwords.

Spam bots submit fake comments, form entries and registrations.

Each type calls for a different response.

Comparison: Bots to welcome and bots to stop
Bots to welcome and bots to stop

Identifying bots

Bots identify themselves through user agent strings, which appear in server logs. Legitimate crawlers use documented names. However, user agents can be faked: malicious bots often pretend to be Googlebot to bypass protections.

Verify important crawlers before trusting them. Google and Bing publish methods to verify their crawlers, such as reverse DNS lookups that confirm requests come from their domains, and published IP ranges. Many AI companies also publish IP ranges for their crawlers. Security tools and content delivery networks often verify known bots automatically.

Look for patterns in logs: very high request rates, requests for unusual paths such as old admin URLs or configuration files, many failed login attempts, or requests that ignore robots.txt. These indicate bots worth controlling.

Robots.txt: the polite layer

Robots.txt tells well-behaved crawlers which parts of your site they may access. It is the right tool for managing legitimate crawlers, including choosing which AI crawlers may collect content. It is not a security tool: malicious bots ignore it, and the file is public.

Use robots.txt to allow search engines, decide on AI crawlers according to your policy and keep crawlers away from low-value areas such as internal search results. Never use it to hide sensitive content, because listing a path in robots.txt can actually reveal it. Test your rules with the robots.txt tool after changes.

Server and network controls

For bots that ignore robots.txt or cause harm, use stronger controls.

Rate limiting restricts how many requests a client can make in a period, slowing aggressive crawlers and brute-force attempts without blocking legitimate visitors.

Firewalls, whether at the host, a content delivery network or a security plugin, can block known malicious IP addresses, suspicious patterns and attacks such as SQL injection attempts.

Bot management services classify traffic by behavior and reputation, allowing verified good bots while challenging or blocking bad ones.

Geographic or IP blocking can stop attacks from specific sources, though it should be used carefully to avoid blocking legitimate users and crawlers.

Challenges, such as browser checks, can filter automated traffic, but should exempt verified search engine crawlers.

Step by step: Protecting WordPress from bad bots safely
Protecting WordPress from bad bots safely

Protecting WordPress specifically

WordPress is a common target because it powers a large share of websites. Basic hardening reduces bot-driven attacks.

Keep WordPress core, themes and plugins updated, since many attacks exploit known vulnerabilities. Remove unused plugins and themes. Use strong, unique passwords and enable two-factor authentication for all administrator accounts. Limit login attempts and consider changing or protecting the login URL. Disable XML-RPC if you do not need it, since it is often abused for brute-force attacks. Restrict access to sensitive files. Use a reputable security plugin or host-level security with firewall and malware scanning. Keep regular backups stored off-site and test restores.

Keep PHP updated to a supported version, since outdated PHP versions miss security fixes.

Protecting forms and comments

Spam bots target contact forms, comment sections and registration pages. Use spam filtering services, honeypot fields that bots fill but humans do not see, rate limiting and, where necessary, challenges. Avoid challenges that make forms inaccessible to people with disabilities; choose accessible options. Disable comments on sites or sections that do not need them. Require approval for first-time commenters.

Content scraping

Scrapers copy content and sometimes republish it, occasionally outranking the original. Complete prevention is impossible for public content, but you can reduce the impact.

Rate limiting and bot management slow large-scale scraping. Monitoring for copies of your content helps you respond. Canonical tags and strong internal linking help search engines identify your site as the original. Publishing promptly and having your content indexed quickly establishes priority. For serious cases, copyright takedown requests to hosts and search engines can remove infringing copies.

Search engines are generally good at identifying original sources, but sites with weak authority may occasionally see scrapers rank. Building authority and monitoring helps.

AI crawlers and resources

Some AI crawlers request large numbers of pages quickly, consuming bandwidth and server resources, especially on smaller hosting plans. If AI crawler traffic causes performance issues, you can rate limit specific user agents, block crawlers you do not want in robots.txt, use caching so bot requests are served cheaply or use services that offer AI crawler controls.

Decide your policy on AI crawlers deliberately: allowing search and answer agents can bring visibility and referrals, while training crawlers offer less direct benefit. Our guide on AI crawlers and robots.txt covers these choices in detail.

Avoiding accidental damage to SEO

Security measures can inadvertently block search engines. Common mistakes include firewall rules that block Googlebot or Bingbot because of high request rates; challenges or CAPTCHAs shown to crawlers, preventing them from reading pages; blocking entire countries or IP ranges that include search engine data centers; blocking resources such as JavaScript and CSS needed for rendering; robots.txt rules accidentally disallowing important sections; and security plugins that return errors to unknown user agents.

After any security change, check Search Console’s crawl stats for spikes in errors or drops in crawl requests, test pages with the URL Inspection tool and monitor indexing reports. Make sure your security tools allow verified search engine crawlers.

Monitoring and response

Set up monitoring for unusual traffic spikes, failed login attempts, malware alerts and uptime. Review logs or bot reports regularly. Keep an incident response plan: what to do if the site is compromised, who to contact and how to restore from backups. Check Search Console for security issue notifications, which appear if Google detects malware or hacked content.

Common mistakes

Relying on robots.txt for security. Blocking all bots, including search engines. Using CAPTCHAs that block crawlers. Ignoring plugin updates. Weak administrator passwords without two-factor authentication. No backups. Overly aggressive firewall rules. Not monitoring crawl stats after security changes.

A worked example: a recipe site under strain

A popular recipe site on shared hosting began experiencing slowdowns and occasional outages. Visitors complained that pages took many seconds to load. The owner assumed the hosting plan was too small and considered an expensive upgrade.

A look at the server logs told a different story. More than half of all requests came from bots. Several AI-related crawlers were requesting thousands of pages per hour, some scrapers were copying recipes systematically and the login page received hundreds of password attempts per day. Googlebot and Bingbot accounted for a modest share.

The owner took several steps. Page caching was enabled so that most requests, including from bots, were served from cache without running PHP. A content delivery network with bot management was placed in front of the site, configured to allow verified search engine crawlers, rate limit aggressive bots and challenge suspicious traffic on the login page. Robots.txt was updated to reflect the owner’s policy on AI crawlers, allowing search agents while blocking training crawlers. XML-RPC was disabled, login attempts were limited and two-factor authentication was enabled.

Server load dropped dramatically, pages loaded quickly again and the upgrade was unnecessary. The owner checked Search Console’s crawl stats over the following weeks and confirmed that Googlebot’s crawling continued normally.

Hosting choices and security

Your hosting environment affects how well you can handle bots. Managed WordPress hosts often include server-level caching, web application firewalls, malware scanning and bot protection, which take much of the burden off site owners. Basic shared hosting may offer fewer protections and limited resources, making bot traffic more disruptive. When choosing or reviewing hosting, ask about firewall protection, bot management, rate limiting, malware scanning and backup policies, and whether search engine crawlers are verified and allowed.

Logging and visibility

You cannot manage what you cannot see. Make sure you can access server logs or bot analytics through your host, content delivery network or security plugin. Review them monthly to understand which bots visit, how much traffic they generate and whether any are causing errors or consuming excessive resources. Keep notes of changes you make to robots.txt, firewall rules and security settings, with dates, so you can connect changes to their effects.

Understanding bot impact on analytics

Bots do not only affect servers; they can distort analytics. Some bots execute JavaScript and appear as visitors in analytics tools, inflating traffic, lowering engagement metrics and skewing conversion rates. Spam referrals can clutter reports with fake sources. If your analytics show sudden traffic spikes with very short sessions, unusual locations or odd referrers, bots may be responsible.

Most analytics platforms filter known bots automatically, but not all. Use bot filtering options, exclude suspicious referrers and segment traffic to separate likely human visitors. Server-side protections that block bad bots also improve the quality of analytics data. Clean data matters, because decisions about content and marketing depend on it.

Login security in depth

The WordPress login page is one of the most attacked parts of any site. Several layers of protection help. Limit login attempts so that repeated failures temporarily block the source. Enable two-factor authentication for all accounts with editing or administrative rights. Use strong, unique passwords stored in a password manager. Avoid the username admin and do not display usernames publicly where possible. Consider restricting access to the login page by IP address for small teams, or adding a challenge for suspicious attempts. Monitor for new administrator accounts you did not create, which can indicate a compromise.

These measures reduce the risk of account takeover, which is one of the most damaging security incidents because attackers can change content, insert spam links or install malicious code that harms both visitors and search visibility.

Hacked sites and SEO

A compromised site can suffer severe SEO damage. Attackers often inject spam pages, hidden links or redirects to malicious sites. Search engines may detect this and show warnings in results, or drop pages from the index. Google’s Search Console reports security issues such as hacked content and malware, and may label results as potentially harmful.

If your site is hacked, act quickly. Take the site offline or put it in maintenance mode if necessary. Restore from a clean backup or clean the infection with professional help. Identify and fix the vulnerability, such as an outdated plugin or weak password. Change all passwords and keys. Remove spam pages and links, and use the removals tool for urgent cases. Once clean, request a security review in Search Console. Monitor closely for signs of reinfection.

Prevention is far easier than recovery, which is why updates, strong authentication and backups matter so much.

Content delivery networks and bots

A content delivery network sits between visitors and your server, caching content and filtering traffic. Many CDNs offer bot management features, including identifying verified good bots, blocking known bad actors, rate limiting and challenging suspicious traffic. Some offer specific controls for AI crawlers, letting site owners block them, allow them or, in some cases, require payment for access.

When using a CDN, check that its security settings exempt verified search engine crawlers and that challenges are not shown to them. Review the CDN’s bot reports regularly to see what traffic it blocks and allows.

Balancing openness and protection

Every site sits somewhere between fully open and fully locked down. A small business site may want maximum visibility, allowing all legitimate crawlers and blocking only clear attacks. A publisher whose content is its product may restrict AI crawlers and scrapers more tightly. An online shop may focus on protecting checkout, login and pricing data from abuse. Decide where you want to be, write it down and configure robots.txt, firewall and bot management rules to match. Revisit the decision as your business and the bot landscape change.

Protecting APIs and endpoints

WordPress exposes several endpoints beyond regular pages: the REST API, admin-ajax, XML-RPC, feeds and, with newer versions, endpoints related to AI abilities and the MCP adapter if enabled. Bots may target these to scrape data, enumerate users or attempt attacks. Review which endpoints your site needs publicly. Restrict or disable those you do not use. Make sure endpoints that expose data require appropriate authentication. Rate limit endpoints that could be abused. If you enable agent access through the Abilities API, use dedicated accounts with minimal permissions and monitor activity.

Price and inventory scraping

Online shops face scrapers that collect prices and stock levels, often for competitors or reseller tools. This can be hard to prevent entirely, since prices must be visible to customers. Rate limiting, bot management and monitoring unusual request patterns reduce large-scale scraping. Some shops show prices only after interaction for certain products, but this can harm user experience and search visibility, so weigh trade-offs carefully. Focus protection on behavior that causes real harm, such as excessive load or automated purchasing of limited stock.

A WordPress security checklist

  1. Keep core, plugins, themes and PHP updated.
  2. Remove plugins and themes you do not use.
  3. Enable two-factor authentication for all editors and admins.
  4. Limit login attempts and disable XML-RPC if unused.
  5. Use a firewall at the host, CDN or plugin level.
  6. Exempt verified search engine crawlers from challenges.
  7. Back up daily off-site and test a restore.
  8. Review bot traffic and crawl stats monthly.

Working with your host and developers

Security is a shared responsibility. Your host protects the server and network, your developers maintain code and plugins and site owners manage accounts, content and policies. Clarify who handles what. Ask your host what protections are included and how they handle attacks. Ask developers to follow secure coding practices, avoid unnecessary plugins and document custom code. Agree on a process for applying updates promptly and testing them on staging when needed. When incidents happen, a clear division of responsibilities speeds up response.

When to get professional help

Some situations call for experts: an active compromise that you cannot clean, repeated reinfections, large-scale attacks that overwhelm your hosting, or legal issues around scraping and copyright. Security firms specializing in WordPress can clean sites, harden configurations and monitor for threats. The cost is usually far lower than the damage of a prolonged compromise, especially if search engines flag your site.

Security and trust signals

Visitors and search engines notice security. A site served over HTTPS with a valid certificate, without malware warnings, spam pages or broken functionality, signals trustworthiness. Security incidents, by contrast, can lead to browser warnings, lost visitors and reputational damage that lasts long after the technical problem is fixed. Treat security as part of your brand and SEO strategy, not just an IT concern.

Start with three steps

If you do nothing else this week, do three things: update everything that has an update waiting, turn on two-factor authentication for every administrator and confirm that a recent backup exists and can be restored. These steps block most of the attacks that automated bots attempt against WordPress sites, and they take less than an hour.

Keep the welcome mat out for the right visitors

The goal is not to keep all bots out. It is to keep the harmful ones out while making it easy for search engines and the AI services you choose to read your pages. Get that balance right and your site stays fast, safe and visible.

Key takeaways

  • Bot traffic includes search crawlers, AI crawlers, tools, scrapers, attackers and spammers.
  • Verify important crawlers rather than trusting user agents.
  • Use robots.txt for polite crawler management, not security.
  • Use rate limiting, firewalls and bot management for harmful bots.
  • Harden WordPress with updates, strong authentication and backups.
  • Always check that security changes do not block search engines.

Frequently asked questions

Can robots.txt stop scrapers? No. Malicious scrapers ignore it. Use server-level controls.

Should I block AI crawlers? It depends on your goals. Blocking search agents can remove you from AI citations; blocking training crawlers is a policy choice.

How do I know if Googlebot is real? Use reverse DNS verification or check Google’s published IP ranges, or rely on security tools that verify it.

Will a security plugin hurt my SEO? Not if configured correctly. Check that it allows verified search engines and does not challenge crawlers.

What should I do if my site is hacked? Restore from a clean backup, fix the vulnerability, change passwords, scan for malware and request a review in Search Console if flagged.

Is XML-RPC needed? Only for certain apps and integrations. Disable it if you do not use them.

Keep reading

Comments

Leave a comment

Check your own site

Run a free audit and see what to fix first.

Run a free audit