Cyberattacks have been portrayed as a widely used new coercive weapon for interstate conflict. While one strand of the literature agrees with this statement, other works contend. Using new data on cyberattacks measured from Internet traffic, this paper tests these claims empirically by investigating whether sanctions lead to an increase in Denial-of-Service (DoS) attacks on the sender countries. Following previous literature, this increase may be due to targeted states that respond with DoS attacks to both the imposition and, even more so, the threat of sanctions as a coercive tool. However, I argue that an increase may also simply reflect DoS attacks launched to voice discontent. For the analysis, I run time series models from 2008 -- 2016 for the United States and the European Union as the most active sanctioning entities. The results show only some evidence for an increase of DoS attacks on the sender state when sanctions are imposed. Sanction threats appear to be unrelated to the development of DoS attacks. These findings support previous theoretical work that questions the coercive use of cyberattacks, suggesting that governments do not frequently use DoS attacks as a foreign policy instrument.