PurposeThe purpose of this study is to investigate how community attachment to an OHC reduces the OHC users' emotional distress and therefore improves their emotional well-being.Design/methodology/approachA survey study was conducted in one of the largest online health communities (OHC) for people with diabetes.FindingsOHC participants are likely to experience reduced emotional distress when they have developed an attachment to the community. This attachment is, in turn, positively associated with the normative expectations of reciprocity and the affective feeling of gratitude. However, some commonly used behavioral measures of community participation, such as visit frequency and membership tenure, have little to do with either community attachment or reduced emotional distress.Research limitations/implicationsThe research highlights the pivotal role of community attachment in appraising the much-debated benefits of OHCs. However, the cross-sectional survey study has its limitations in terms of establishing causality.Practical implicationsOHC managers need to look beyond some of the commonly used metrics, such as monthly visits and number of new postings, and focus on fostering a sense of attachment among existing users in order to fulfill the OHC's potential of emotional support. Our study implies that design features facilitating reciprocation and gratitude expression among users can lead to a strong emotional bond.Originality/valueThis is one of the first studies on the antecedents of community attachment and the relationship between community attachment and emotional distress in the context of OHC.