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.”

A website search box sending out many copies of a search results page filled with warning-coloured spam blocks, each with its own URL bar, towards a crawler
Figure 1. Internal search spam: junk search URLs are created at scale and fed to search engine crawlers.

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.”

Rank Check Reports

Cleaning up a spam attack? Check that your important keywords kept their positions.

A live Google check of your keywords on desktop and mobile · from $14.99 per check · no subscription · report within one working day

Order a rank check report →

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 crawler's path split between many grey spam pages and a few important pages, with an hourglass showing the important pages waiting
Figure 2. Crawling spent on spam URLs is crawling not spent on the pages that matter.

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.

Search Console page indexing report listing many search URLs with Chinese characters excluded by a noindex tag
Search Console showed the spam search URLs as excluded by the noindex tag (screenshot from the 2023 case).

Looking deeper, the attack was fairly sophisticated, using what looked like non-existent referring subdomains created at scale.

Example list of spam internal search URLs from the attack as shown in Search Console
Examples of the spam search URLs (screenshot from the 2023 case).

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.

Analytics chart showing the number of new not-found URLs falling after site search was disabled
New not-found URLs fell after search was disabled (screenshot from the 2023 case).

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.
A WordPress search box behind a shield, with spam search requests bouncing off as not-found pages while a normal search passes through to results
Figure 3. Layered protection: unwanted search formats return not found, real searches still work.

Noindex hides the spam from searchers. Only stopping the crawl, or removing the URLs, stops it costing you Googlebot’s time.

Free tool · Ping My URL

After the clean-up, let search engines know about the real pages you updated.

Notify Google and other search engines about up to 5 new or updated URLs at once. Free, no sign-up.

Ping your URLs →

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.

Free tool · SEO ROI Calculator

Want to show what’s at stake? Estimate what your main keywords are worth before and after a crawl problem.

Enter search volume, CPC and your current ranking to estimate traffic, revenue and value for a keyword. Free.

Calculate your SEO ROI →

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.

Eugen Platon

Eugen Platon

Director of SEO & Web Analytics at onwardSEO
Eugen Platon is a highly experienced SEO expert with 16+ years of experience propelling organizations to the summit of digital popularity. Eugen, who holds a Master's Certification in SEO and is well-known as a digital marketing expert, has a track record of using analytical skills to maximize return on investment through smart SEO operations. His passion is not simply increasing visibility, but also creating meaningful interaction, leads, and conversions via organic search channels. Eugen's knowledge goes far beyond traditional limits, embracing a wide range of businesses where competition is severe and the stakes are great. He has shown remarkable talent in achieving top keyword ranks in the highly competitive industries of gambling, car insurance, and events, demonstrating his ability to traverse the complexities of SEO in markets where every click matters. In addition to his success in these areas, Eugen improved rankings and dominated organic search in competitive niches like "event hire" and "tool hire" industries in the UK market, confirming his status as an SEO expert. His strategic approach and innovative strategies have been successful in these many domains, demonstrating his versatility and adaptability. Eugen's path through the digital marketing landscape has been distinguished by an unwavering pursuit of excellence in some of the most competitive businesses, such as antivirus and internet protection, dating, travel, R&D credits, and stock images. His SEO expertise goes beyond merely obtaining top keyword rankings; it also includes building long-term growth and optimizing visibility in markets where being noticed is key. Eugen's extensive SEO knowledge and experience make him an ideal asset to any project, whether navigating the complexity of the event hiring sector, revolutionizing tool hire business methods, or managing campaigns in online gambling and car insurance. With Eugen in charge of your SEO strategy, expect to see dramatic growth and unprecedented digital success.
Eugen Platon
Check my Online CV page here: Eugen Platon SEO Expert - Online CV.