Reading digital texts is a common practice in today’s education. Prior studies showed that the coherence of a text can influence text comprehensibility with low degrees of coherence causing attention failures (mind wandering) and, consequently, negatively impacts reading comprehension. In addition, working memory capacity (WMC) and prior knowledge of the subject have been suggested to be related to both reading comprehension and mind wandering. However, results remain controversial as the interaction of these three factors has not yet been explored. 90 participants either studying law or a different subject read either a coherent or incoherent version of the same unfamiliar hypertext about the copyright law. While reading, they reported self-caught mind wandering with task-embedded thought probes. After reading the hypertext, participants were tested on their text comprehension. Supporting prior findings, mind wandering did occur more frequently when participants read difficult rather than easy texts regardless of their undergraduate course. Moreover, this was modulated by WMC in that participants with lower WMC exhibited more frequent mind wandering than high WMC participants solely when reading low coherent texts. In addition, high WMC participants outperformed low WMC participants on all measures of text comprehension. With a low WMC it seems difficult to inhibit irrelevant information and access related information from working memory, especially when text complexity is high. Interestingly, the present results also indicate that prior knowledge benefits later text comprehension despite not affecting reader’s attention. These findings provide insights into processing attention during reading online texts.