This paper sets out a philosophical framework for governing harmful speech on social media. It argues that platforms have an enforceable moral duty to combat various forms of harmful speech through their content moderation systems. It pinpoints several underlying duties that together determine the content and stringency of this responsibility. It then confronts the objection that it is morally impermissible to use automated systems to moderate harmful content, given the propensity of AI to generate false positives and false negatives. After explaining why this objection is not decisive, the paper concludes by sketching some implications for legal regulation.