Background: The emergence of virtual social networks has facilitated a new form of marital infidelity known as internet infidelity. Aims: This study investigated the mediating role of self-esteem in the relationship between self-compassion, relationship maintenance behaviors, and attitudes toward internet infidelity. Methodology: A cross-sectional study using SEM was conducted among 481 Iranian married users. The data collection was performed using Internet Infidelity, Relationship Maintenance Strategies, Self-Compassion, and Self-Esteem Questionnaires. SEM was used to examine hypothesized relationships, and the bootstrap in Preacher and Hayes’ Macro program was employed for testing mediation. Findings: SEM analysis revealed that self-compassion and relationship maintenance behaviors had a direct effect on both self-esteem and attitudes toward internet infidelity ( P</em>< 0.0001). However, the hypothesized mediating role of self-esteem was not supported. These findings underscore the significant influence of self-compassion and relationship maintenance behaviors in predicting attitudes toward internet infidelity. Conclusion: Counseling interventions aimed at fostering self-compassion and reinforcing relationship maintenance skills may help reduce the risk of internet infidelity.