For a project, we want to exclude some information on a page so that it does not appear on Google search results. We mainly want to hide the usernames from the comments, so that those users are not findable via Google. This is mainly meant for the protection of the users (and also for avoiding customer care calls when people find themselves in Google on pages they don't want to be found).
There are different solutions to this problem and we assume we didn't find the perfect one yet, so maybe someone of our readers has some insights.
Here are our solutions:
- Remove the usernames from the page, when the Googlebot is detected. Could work. No negative impact to the general visitor. Just two questions: If Googlebot disguises itself as a different user agent, we deliver it the usernames nevertheless, what does it do with it? Add it to the index? Treat the site as “you deliver different results to Google than your visitors. You're bad. You lost your karma”? (which we have to avoid, of course). I doubt such a small change will trigger that alarm or that it will end up in the index, but no one knows for sure (at least I didn't find anything).
Conclusion: Could work, unknown risk that it does bad things.
- Use images instead of text. As long as Google doesn't do OCR, that works. The general visitor can't copy&paste, but apart from it, it works for him. But blind people do have a problem then and accessibility is important on that site.
Conclusion: Does work. But is not accessible and may look very strange.
That's what we came up with. Nothing is really satisfying and there's no official solution by Google, as far as I know. Excluding whole pages from Google is easy, but excluding just parts of it almost impossible without dirty hacks.
If anyone comes up with a way more elegant solution, we really like to hear it. The comments are open.