In light of recent findings which seem to disfavour a scenario with warm dark matter entirely constituted of sterile neutrinos produced via the Dodelson-Widrow (DW) mechanism, we investigate the constraints attainable on this mechanism when relaxing the usual hypothesis that the relic neutrino abundance must necessarily account for all of the dark matter. With this purpose we first study how to interpret the limits attainable from X-ray non-detection and Lyman-alpha forest measurements in the case in which sterile neutrinos constitute only a fraction f_s of the total amount of dark matter. Then, assuming that sterile neutrinos are generated in the early Universe solely through the the DW mechanism, we demonstrate how the X-ray and Lyman-alpha results jointly constrain the mass-mixing parameters governing their production. Furthermore, we show how the same data allows us to put a robust upper limit f_s<0.7 at the 2 sigma level, rejecting the case of f_s=1 at approximately the 3 sigma level.