Debug your website as Google-bot from shell

Google and other search engines  implement their own lists of hacked and vulnerable pages. That is fantastic, but might be nightmare for administrators to debug – regular practice for bad guys is to only show bad content to search engines and this way destroy your domain reputation. Such hacks might last for quite long time, as you, visiting your page with Firefox or Chrome or even IE – won’t notice it until your browser comes up with huge ugly red page.

So – let’s make it a bit more simple to debug. If you are admin trying to debug, how Google see your page – and got access to some nice shell with installed curl – you can run this simple command:

curl --user-agent "Googlebot/2.1 (+http://www.google.com/bot.html)" -v https://blog.hosting.guru/ -o output.html

If there are no errors or hidden redirects – you will see output HTML in output.html file. Examine it, try finding bad JS, hidden iframes or links to hacked external sites.. Of course – you will also need to find, where and why output for Google is different. This is different story.. 🙂 (yes, look in .htaccess, search in PHP files).

Good luck cleaning!

Facebooktwittergoogle_plusredditpinterestlinkedinmail

Leave a Reply

Your email address will not be published. Required fields are marked *

*

code