The owners and webmasters of around 20,000 websites have been warned by search giant Google of possible attacks by hackers. The warnings were sent to the owners of those sites, which according to the head of Google’s anti-spam team Matt Cutts were doing the so-called weird redirects.

“Is your site doing weird redirects? We just sent a ‘your site might be hacked’ message to 20,000 sites,” said Cutts in a Twitter post.

A link that contained a sample of the message that Google sent to the affected webmasters and site owners was also given along with the post. An English translation of the warning says, “we are writing to let you know that we believe some of your website’s pages may be hacked.”

“Specifically, we think that JavaScript has been injected into your site by a third party and may be used to redirect users to malicious sites,” it added.

The websites were also warned that server configuration files could also have been affected. “As a result of this, your site may be cloaking and showing the malicious content only in certain situations,” warned Google.