Key takeaways
- Internal search spam abuses your WordPress search: spammers create search URLs full of spam text and get them in front of Google.
- A noindex tag on search pages, which Yoast SEO adds automatically, keeps them out of the index, but Google still has to crawl each URL to see the tag.
- Google’s crawl budget guidance says “Don’t use noindex” to save crawling, and its 2017 crawl budget post lists “Low quality and spam content” among the URLs that waste it.
- Stronger fixes: block the search URL patterns from crawling, return 404s for search formats you don’t need, or disable site search if you don’t use it.
- Watch Search Console’s page indexing report: a sudden jump in noindexed or not-found URLs is often the first sign.
Internal search spam is one of those problems an SEO usually spots before anyone else, because it shows up in Search Console long before it shows up in sales. It targets the search box that every WordPress site has, and it can create hundreds of junk URLs in days. This is how I approach it as part of WordPress SEO work, including a real case I handled in 2023.
I have worked in SEO and digital marketing for more than 16 years. The crawling side of this problem connects to a bigger topic: if you run a large site, my guide to crawl budget and when it matters explains when wasted crawling becomes a real issue.
I have rewritten this post to correct two quotes that no longer match Google’s documentation, replace a statement I could not verify, and add the newer options WordPress site owners have.
What internal search spam is
Every WordPress site has an internal search. Searching for a word creates a URL such as yoursite.com/?s=word or yoursite.com/search/word/, and WordPress builds a results page for whatever text is in that URL. Spammers exploit this by putting spam text, often promoting dubious goods or services, into search URLs and getting those URLs discovered by search engines.
Yoast, whose plugin many WordPress sites use, describes it in its article on internal site search spam as “large-scale, widespread SEO spam ‘attacks’ on WordPress sites, all targeting their internal site search”, and points out the core problem: “You can put anything you want in those URLs.”
Why noindex alone is only half the fix
Yoast SEO, as its own article explains, “automatically adds a noindex meta robots directive to your internal search results page”. That stops the spam pages from being indexed, which protects your brand in search results.
The catch is crawling. A noindex tag only works if Google fetches the page and reads it. Google’s guide to HTTP status codes explains that for a 200 page, Google passes what it received on to the next step, and “The indexing systems may index the content, but that’s not guaranteed.” Each spam URL still costs a crawl.
For sites where crawling matters, Google’s crawl budget guidance is direct: “Don’t use noindex, as Google will still request, but then drop the page when it sees a noindex meta tag or header in the HTTP response, wasting crawling time.”
How spam pages affect crawling
Google explained the risk years ago in its post What Crawl Budget Means for Googlebot. Its list of low-value-add URLs includes “Hacked pages”, “Infinite spaces and proxies” and “Low quality and spam content”, and it warns: “Wasting server resources on pages like these will drain crawl activity from pages that do actually have value, which may cause a significant delay in discovering great content on a site.”
For a small site, a few hundred extra crawls may not matter much. For a large one, or during an attack that creates hundreds of URLs a day, it can slow down how fast your real pages are discovered and refreshed.
A real case: an internal search spam attack in 2023
In 2023 I worked on a case where an attack created more than 600 new search URLs within a few days, at a rate of more than 200 a day. The client’s main shop was not on WordPress, but its content section was. Search Console reported the URLs, many containing Chinese characters, as excluded by the noindex tag that Yoast SEO had added.
Looking deeper, the attack was fairly sophisticated, using what looked like non-existent referring subdomains created at scale.
It was a Friday afternoon and nobody was available to deploy code to the production site, so the quickest safe step was a plugin that disabled the WordPress search feature. We monitored the attack closely, and after search was disabled the number of new not-found URLs dropped significantly.
How to protect a WordPress site
There is no single right fix; it depends on whether you need site search and how large the site is.
| Option | What it does | Watch out for |
|---|---|---|
| Keep noindex on search pages | Keeps spam pages out of the index | Google still crawls every URL |
| Return 404 for unwanted search formats | Tells Google the URL doesn’t exist | Make sure real searches still work |
| Block search URLs in robots.txt | Stops crawling of those patterns | Google can’t see noindex on blocked pages |
| Disable site search | Removes the attack surface | Only if visitors don’t need search |
- Use your SEO plugin’s crawl settings. Yoast SEO Premium’s crawl optimisation features let you “limit the maximum length of search queries” and disable “common attack patterns (like searches containing emojis)”, and it notes that “Blocked search formats will return 404 errors.”
- Understand 404s. Google’s crawl budget guide calls a 404 status code “a strong signal not to crawl that URL again.” Its HTTP status page adds that Google doesn’t use the content from URLs that return 4xx codes.
- Choose robots.txt carefully. Google says blocking with robots.txt “prevents Google from crawling them”, but its noindex documentation warns that “For the noindex rule to be effective, the page or resource must not be blocked by a robots.txt file”. Decide which mechanism you rely on for which URLs.
- Disable search if you don’t use it. On a brochure site, it may simply not be needed.
Noindex hides the spam from searchers. Only stopping the crawl, or removing the URLs, stops it costing you Googlebot’s time.
What to monitor in Search Console
Internal search spam is easiest to stop early. These are the numbers I watch in the page indexing report:
- Indexed vs not indexed pages, and any sudden change in either.
- Pages excluded by the noindex tag: a spike often means search spam.
- Not found (404) pages: a spike after a fix is expected; a spike out of nowhere is not.
- “Crawled – currently not indexed”: large growth here is worth investigating.
When one of these jumps, look at example URLs first. Spam search URLs are usually easy to recognise by their pattern.
FAQ
What is WordPress internal search spam?
Spammers create search URLs on your WordPress site with spam text in them, so that the search results pages repeat their message, and get those URLs discovered by search engines.
Is a noindex tag enough to stop internal search spam?
It keeps the pages out of Google’s index, but Google still crawls each URL to see the tag. On larger sites, also stop the crawling or return 404s for search formats you don’t need.
Should I block WordPress search URLs in robots.txt?
It stops crawling of those patterns, but Google can’t then see a noindex tag on them. Decide which mechanism you rely on, and test that real search still works if visitors need it.
How do I know if my site is under an internal search spam attack?
Look for sudden jumps in noindexed, not found or crawled-not-indexed URLs in Search Console’s page indexing report, then check example URLs for spam text.