I have the search form on a section of a site that is getting bombarded with requests like:

search query = baccarat philippe starck furniture, ➡️g188.ph⬅️, play free slots with bonus gcash logo cash, e sabong gcash slot games, ➡️g188.ph⬅️, baccarat bonus rules philippines islands countvv


search query = 手机上查找身份证信息怎么查-(⏭查询网站gps67.com⏮)-中国移动查自己身份证信息-根据身份证号查信用信息-利用身份证号查车次信息-(⏭查询网站gps67.com⏮)-执法上门查身份证信息NQ  

So quote obviously junk spam stuff.

However, the REMOTE_ADDR of the request is which traces back to Google.


"HTTP_USER_AGENT":"Mozilla\/5.0 (Linux; Android 6.0.1; Nexus 5X Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/110.0.5481.100 Mobile Safari\/537.36 (compatible; Googlebot\/2.1; +http:\/\/www.google.com\/bot.html)",

The fact it's reading Android 6 on a Nexus 5 raises some suspicions... but, could a request have a spoofed REMOTE_ADDR? I don't see how, so is the only feasible explanation that this is Google, and somewhere they have found and are following links to my search form, e.g.


and just crawling these external links?

But I'm also not sure about this theory, as the HTTP_REFERER is internal, e.g. from example.com/search.php?keyword=otherspam

I can't just put the IP into my firewall ban list, as it is a genuine IP of Google's bots.

I can write some on-site logic to try and ban this particular user but again, not ideal as it's Google's IP!

FYI my traffic is routed through Cloudflare.

Any ideas or suggestions?!


Full $_SERVER below:

"HTTP_USER_AGENT":"Mozilla\/5.0 (Linux; Android 6.0.1; Nexus 5X Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/110.0.5481.100 Mobile Safari\/537.36 (compatible; Googlebot\/2.1; +http:\/\/www.google.com\/bot.html)",
"CONTENT_TYPE":"application\/x-www-form-urlencoded; charset=UTF-8",
"HTTP_COOKIE":"PHPSESSID=8c68cbd41264f9c72bd863bb3d53135a; web_4f857_lastUrl=https%3A%2F%2Fexample.com%2FshopSearch.php%3Fkeyword%3D%26keyword%3Dsabong%2520slots%2520capital%2520bonus%2C%2520%25E2%259E%25A1%25EF%25B8%258Fg188.ph%25E2%25AC%2585%25EF%25B8%258Fsabong%2520slots%2520capital%2520bonus%2C%2520-free%2520slots%2520with%2520bonus%2520coins%2520gcash%2520download%2520in%2520laptop%2C%2520%25E2%259E%25A1%25EF%25B8%258Fg188.ph%25E2%25AC%2585%25EF%25B8%258Fsabong%2520slots%2520capital%2520bonus%2C%2520-free%2520slots%2520with%2520bonus%2520coins%2520gcash%2520download%2520in%2520laptop%2Clm; sticky_=http:\/\/",
"SERVER_SIGNATURE":" Apache\/2.4.53 (Debian) Server at www.example.com Port 80<\/address>\n",
"SERVER_SOFTWARE":"Apache\/2.4.53 (Debian)",

UPDATE: I have followed https://developers.google.com/search/docs/crawling-indexing/verifying-googlebot to vefify the IP is a genuie Google Bot, and it is...

So is the best explaination that somehow somewhere links to example.com/search.php?search=spam exist, and Google has found and is crawling them?

  • Correct, this is quite common. Commented Feb 24, 2023 at 10:29

1 Answer 1


You should disallow your site search in robots.txt:

User-Agent: *
Disallow /search.php

Whenever you have an infinite URL space like this, you don't want Googlebot to try to crawl it. It can generate a lot of crawling for something that won't help your SEO.

Google doesn't want to index site search results. They view site search pages as low quality content. They say it is very poor user experience when a user clicks from Google only to find themselves on another similar page of search results. Google sometimes penalizes sites that allow their site search to be crawled and indexed because of that. See Matt Cutts: Search results in search results.

There are three ways that Googlebot finds these URLs:

  1. It finds links to them from some other site.
  2. There is malware installed on your site that is creating pages only visible to Googlebot.
  3. Googlebot tests search terms on its own to test if you create pages for spammy searches (like "viagra") so that it knows whether or not it should penalize your site.

Using robots.txt to block these URLs will help in all those cases. It would also be a good idea to check Google Search Console and make sure you recognize all the URLs that are getting indexed. If you see spammy URLs that you didn't create, you will need to clean up the malware that got installed on your site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.