By vaccinating those individuals with the largest social networks, whole populations could be protected from disease outbreaks more efficiently. Karen Hopkin reports