I have been getting this kind of results in google search console i cannot clean them i guess my website is affected with malware. Can you guys help?
https://prnt.sc/ufx9bEOoZka8

Dani AI

Generated

In ’s situation the Chinese-looking entries in Google Search Console are most often either (A) internal site search result pages being crawled (random user/bot queries) or (B) pages injected by a compromise. Quick diagnostics: fetch a sample URL in a private browser and view the rendered content and page source; use Google Search Console’s URL Inspection to see Google’s render; and scan server access logs for repeated requests, unusual referrers, or patterns. If the page contains unfamiliar scripts, links, or content that doesn’t match the site’s templates, treat it as a likely hack.

As suggested, blocking search-result URLs from being crawled is useful — but a robots.txt disallow alone does not reliably remove already indexed URLs. For reliable de-indexing, serve a meta-robots noindex on the search-results template or return a 404/410 for those query-parameter pages, then use Search Console’s Removals tool and URL Inspection to request recrawl. Example meta tag to place in the search-results template:

<meta name="robots" content="noindex, nofollow">

A server-level approach (Apache) to return HTTP 410 for any URL with a q query parameter:

RewriteEngine On
RewriteCond %{QUERY_STRING} (^|&)q=
RewriteRule ^ - [G]

Always test such changes on a staging site and keep backups; a blanket rule can break legitimate pages that use ?q= for non-search purposes.

If a compromise is detected, perform a standard cleanup: scan with security tools (e.g., Wordfence/Sucuri), compare files against a clean backup, remove/restore altered files, search the database for injected HTML, remove unknown admin accounts and rogue cron jobs, rotate all credentials, and update core/plugins/themes. After cleanup and application of noindex/410, submit removals and request re-indexing in Search Console, then monitor Coverage and Security reports. Combining ’s robots approach with a noindex or proper server responses plus the GSC removals flow will stop new crawls and remove already indexed Chinese URLs; if files or DB entries are injected, the cleanup checklist above is required.

Recommended Answers

All 3 Replies

It looks like people are typing random spam into your search queries. Your search results page should be noindexed or blocked in robots.txt.

how do i block it ?

Sorry, I didn't see your response until now. To block Google from wasting its time crawling all these random search queries, you can create a robots.txt file at your root domain: e.g. www.example.com/robots.txt and put the following in it:

User-agent: *
Disallow: /*?q=

Basically what those two lines mean are that all bots visiting your website should never crawl URLs that are in the format /<blah>?q=<blah>

This will block all of those URLs in search console. In my experience, it's often a good idea to block all search queries because Google doesn't ever want to rank your search result pages in its search results (it wouldn't make much sense for someone doing a Google search to be pointed to yet another search results page). Also, there are a theoretical infinite number of search result pages since users can type in any freeform search text they want. However, be careful that there aren't any URLs on your site in which there is a ?q= parameter that is not denoting a search query. You don't want to block pages you don't mean to.

Hope this makes sense.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.