One day, when you access Search Console, you may notice an unusually high number of indexed pages within a short period.
The graph depicting ‘indexing => pages’ in Search Console shows a sharp increase.

What happens to your website?
Indeed, there could be one or more reasons behind this issue. Among them, two key factors stand out:
- Indexing an excessive number of photos.
- Indexing an excessive number of internal search result pages.
In recent months, based on discussions in various forums and groups, the second problem appears to be on the rise.
Therefore, I’ll address the second one first.
1. Indexed pages too much because of internal search results
Most of WordPress themes have an internal seach feature, which helps your readers find their needs on your site quickly.
However, since WordPress version 5, I have encountered issues with bloated index pages due to internal search results.
This can be a negative spam attacks on Internal Search.
To solve this one, you need to block searching spam attacks by:
Method 1.1. Temperary stop or remove internal search feature on your website, but this method is not recommended when searching is important for yours.
Method 1.2. Using Yoast to stop crawling and indexing the pages created by internal search.
Open Yoast SEO – Settings – Advanced – Crawl Optimization. Then, focus on the section “Disable unwanted content formats” and do as below.

Method 1.3. Or, using robots.txt file in the manager of hosting to add these code:
User-agent: *
Disallow: /?s=
Disallow: /page/*/?s=
Disallow: /search/
Please note that if you use method 2, please do not use method 3 because the codes as the method 3 will automatically add in robots.txt when setting the feature of “Crawl Optimization” in Yoast.
2. Index too many photos
Every photo on your website has a URL address that can be indexed by search engines if SEO optimization is not configured correctly.
Inadvertently, your website may have allowed Google to index numerous photos, each treated as a separate page. These pages hold no meaningful or useful content; they simply display individual photos.
This issue causes the boated index, as mentioned above. This harms your SEO efforts.
Resolve it by setting up redirects from a URL page to the photo’s URL itself.
Open your Yoast SEO – Settings – Advanced – Media pages, then make sure “Enable media pages” turns off.

These two methods can help you prevent bloated index pages, thus strengthening your website’s Google ranking.