BackgroundDigital transformation in rural areas has become a key policy priority worldwide. China is also implementing a digital village strategy and actively promoting the digital transformation of rural governance to improve the well-being of rural residents. The literature suggests that digital governance is linked to health, but the mechanisms behind this relationship remain unclear.MethodsUsing data from the 2021 China Land Economic Survey (CLES), this paper examines the impact of digital governance on the health, longevity, and mental health of rural residents. To enhance the robustness of the conclusions, this paper also introduces a dual machine learning model to solve the endogeneity problem of the model.Conclusion and discussionThis study concludes that digital governance has a significant positive impact on the health of rural residents. This finding remains consistent even after addressing endogeneity issues and conducting numerous robustness tests. Mechanistic analyses indicate that digital governance can enhance rural residents’ health by improving village governance (environmental governance) and increasing the efficiency of access to personal information. Further analysis reveals that digital governance significantly increases the life expectancy of rural residents but that its effect on mental health is not significant. This study provides new insights into how digital governance affects health, with important implications for health policy development.