Hi Guys, thanks all for your thoughts, I found that it seems to be some kind of Japanese Spam campaign, i wanted to link it here, but seems i'm not allowed to. This is a really positive community with people genuinely helping each other, keep it up!
I recently dealt with something similar on one of my sites. However, instead of it showing up as a bunch of non-existent permalinks, it was targeting my search form!
I recently wrote an article on it recently as it reminded me of referrer spam. You can read it
here, but I'll tell you what was going on in my case and what I did to fix it in my post.
So some guy on another forum posted this as a possible reason for the spam.
- The "attackers" penetrate as many site searches as possible with search phrases containing a (mostly) malicious URL. Q82019309 dot com
- They hope that some sites don't exclude their own (internal) search result pages from being indexed (e.g. via noindex) so the search result pages itself get indexed by google in order to spread the malicious url.
- This is way easier to do than really hacking a site.
- It's in some way comparable to Google Analytics referral/ghost spam.
- All they need to do is find websites with integrated search function (like in wordpress) an fire their search queries.
The spammer who hit your site may have shared the same motive, though with a different method.
Anyway, to fix it (for any of you dealing with search form spam) add these two line to your robots.txt file
Code:
User-agent: *
Disallow: /?s=
That'll keep Google from crawling search form queries.
If your visitors don't use your search form often, you can try disabling it permanently or at least temporarily. There's
a plugin you can use for that.
You may have a few other options such as changing your search parameters, but I have yet to test these. Regardless, here's the search parameter code below:
PHP:
// Add this code to your functions.php file in your active theme folder
// Allow WordPress to access “search” in the query string
function ds_whitelist_new_search_parameter( $allowed_query_vars ) {
$allowed_query_vars[] = ‘search’;
return $allowed_query_vars;
}
add_filter(‘query_vars’, ‘ds_whitelist_new_search_parameter’ );
// populate s parameter with value of search
function ds_swap_search_parameter($query_string) {
$query_string_array = array();
// convert the query string to an array
parse_str($query_string, $query_string_array);
// if “search” is in the query string
if(isset($query_string_array[‘search’])){
$query_string_array[‘s’] = $query_string_array[‘search’]; // replace “s” with value of “search”
unset($query_string_array[‘search’]); // delete “search” from query string
}
return http_build_query($query_string_array, ”, ‘&’); // Return our modified query variables
}
add_filter(‘query_string’, ‘ds_swap_search_parameter’);
As for whether or not these 404 errors will hurt your site, this article's a bit old, but 404 errors on pages that never existed on your site won't hurt your rankings. Howeverm if Google picks up a bunch of 404 errors on pages that are currently indexed, then expect your rankings to plummet. Still, get them fixed.
https://webmasters.googleblog.com/2011/05/do-404s-hurt-my-site.html
Q: Someone has scraped my site and caused a bunch of 404s in the process. They’re all “real” URLs with other code tacked on, like
http://www.example.com/images/kittens.jpg" width="100" height="300" alt="kittens"/></a... Will this hurt my site?
A: Generally you don’t need to worry about “broken links” like this hurting your site. We understand that site owners have little to no control over people who scrape their site, or who link to them in strange ways. If you’re a whiz with the regex, you could consider redirecting these URLs as described here, but generally it’s not worth worrying about. Remember that you can also file a takedown request when you believe someone is stealing original content from your website.
Now, in your case where the URLs are showing up as permalinks as if they're posts on your site, add a honeypot to your site that detects users or bots searching for huge numbers of nonexistent pages and subsequently blocks them. There was a user on a webmaster forum who used a honeypot on his site for this purpose, so you should be able to as well.