Imagine you work at a Latex glove factory. One night, you type ‘Latex’ into Google: you’re searching for competitors’ products, but you find other things too. Some of what you find turns you on. But some of it you wish you could unsee: prior to the search, it was morally unthinkable.

It’s easy to underappreciate the importance of the morally unthinkable. Discussions of ethics tend to focus on matters of conscious choice: which moral rules to follow, or advice on how to approach moral dilemmas. But a hugely significant part of ethics concerns what is unthinkable. You might, for example, be strapped for cash, but robbing the neighbours is unlikely to be an option for you. That’s because, whenever you deliberate, you have already ruled out all kinds of unthinkable possibilities. It isn’t that you consider robbery only to dismiss it: the idea never even crosses your mind.

One of the main ways that virtues function is by silencing a whole range of unethical possibilities, to borrow a term from the philosopher John McDowell at the University of Pittsburgh. ‘Virtues’ can sound antiquated – stuffy and overly moralistic – but they play an indispensable role in everyday life. You simply don’t think certain thoughts – running a red light; pilfering a colleague’s purse; making a cruel joke – because you’re just not that kind of person.

There are at least two senses of ‘morally unthinkable’. The first, that of something you have no inkling of – as in the Latex example – is perhaps the purest form of moral innocence. Not only can you not contemplate doing X: you don’t even know what X is. This is the innocence that parents worry their children will lose online. ‘Just remember,’ as the father says to his son in Cormac McCarthy’s dystopian novel The Road (2006), ‘that the things you put into your head are there forever.’

Then there is the worry that if something becomes thinkable in the imaginative sense, then it might eventually become thinkable in the practical sense too. Perhaps, as in the tragic death of the British teenager Molly Russell in 2017, someone moves from exposure to Instagram images of self-harm to actual self-harm. If you follow sport, then endless online gambling ads normalise the activity of betting: after that, there’s only the question of whether to start betting yourself and, if you do, whether you become addicted. The temptation to get sucked into misogynistic pornography is also plain to see, most obviously for straight boys and men. If virtue depends in part on actions being unthinkable, then the internet doubtless has a tendency to make unvirtuous actions all too thinkable.

One of the most iconic philosophical expressions of the Enlightenment is the 18th-century German philosopher Immanuel Kant’s declaration (taken from the Roman poet Horace) Sapere aude or ‘Dare to know.’ The internet, in a strange twist on Kant’s rousing mission statement, is a standing invitation to dare to know. And what a brilliant thing it is. But few parents have not worried about how their children might be changed by their exploratory journeys online.

Perhaps inevitably, public discussion of the internet’s potential to undermine virtue focuses on the vast amount of easily accessible pornography. When the influential Williams Committee on Obscenity and Film Censorship reported to the UK government in 1979, it concluded that there was no clear evidence of a link between exposure to sexually explicit material and proclivity to sexual violence. But since that time, such studies have increased greatly, and the research questions are now more precise. The philosopher Lorna Finlayson at the University of Essex notes in a recent summary of the research on pornography that there is overwhelming evidence that certain kinds of porn fuel violent sexual acts and attitudes. Finlayson herself suggests that this should be as surprising as finding out that ducks like water or that the taste of beer makes you want to drink more beer.

What we imagine is not inert: what we think about changes the people we are, either quickly or over time – but it still changes us. Porn, the research suggests, has the tendency to encourage the prevalence of thoughts that shouldn’t be thought: that women enjoy rape, and that No doesn’t really mean No. More generally, it has the tendency to encourage what the British feminist film theorist Laura Mulvey in the 1970s dubbed the ‘male gaze’: men staring at women’s bodies in a way that bypasses concern for a woman’s consent. Liberals, worried about potential censorship, can sometimes find themselves defending the implausible position that great art has great benefits but that junk culture never produces any harms.

The idea that being a decent person involves controlling the kinds of thoughts you allow yourself to think can easily be met with resistance. If virtue depends on limits to what is thinkable, and a certain free-thought ideal celebrates no limits, then the potential conflict between freethinking and virtue is obvious. And if the choice is offered between thinking whatever you like and being virtuous, then it’s perhaps no surprise that some will opt for absolute freedom of thought. Freedom, for artists and thinkers in this tradition, is the ultimate value – and, as a result, virtue is depicted as restrictive and square. What emerges is an anarchic freethinking ideal that cherishes humour and shock appeal. You can find it in punk music and in the cartoon series South Park, and baked into the founding libertarian ethos of the web. The most influential contemporary representatives of the ideal are no doubt the alt-Right contributors to 4chan but it’s basically everywhere online.

Concern about virtue and innocence, especially if we use these now faintly archaic terms, is something that’s easy to mock, particularly in cultures that celebrate what’s edgy and savvy. The Irish wit Oscar Wilde’s response to the Society for the Suppression of Vice was to joke that he and his mother had ‘founded a society for the suppression of virtue’. And we know what Wilde (and later followers in his footsteps) objected to: po-faced moralisers, killjoys, unthinking enforcers of traditional morality. Judgments of sexual morality, moreover, can be notoriously difficult. If the image you are looking at is disturbing, is it because it is explicit and unfamiliar to you, or is it because it is wrong? When are you looking at a problem, and when is the problem you?

That people can be ethically mistaken is not, however, a good reason for having no ethics at all. And the fact of fallibility does not take away the basic tension identified above: between virtues that by their nature restrict thought and imagination and the prevailing spirit of the internet that encourages the idea that everything should be viewable and thinkable. The idea that freedom and freethinking might cause problems for virtue didn’t start with the internet. The potential conflict shows up in culture everywhere from John Milton’s Paradise Lost (1667-74) to the writings of the Marquis de Sade. But, as with so much else, the internet intensifies the situation. If, as the Irish playwright George Bernard Shaw wrote, virtue is insufficient temptation, then the internet makes sure we are never lacking.