A door-locking device for self-cleaning household ovens, comprising: - a support intended to be fixed to a frame of the oven, - a main slider movable relative to the support along a longitudinal rectilinear direction, pushed elastically towards an extracted position and intended to be pushed by a door of the oven towards a retracted position, wherein the main slider also comprises a cam, - a locking arm articulated to an articulation portion of the support around an articulation axis perpendicular to said longitudinal rectilinear direction and oscillating around said articulation axis between an unlocked position and a locked position, - a transmission mechanism which connects the locking arm to the main slider and arranged to swing the locking arm from the unlocked position to the locked position and vice versa due to the movement of the main slider from the extracted position to the retracted position, and vice versa, - an electromagnetic switch comprising a door-sensing switch and an electromagnet which drives a movable frame associated with a locking pin arranged to lock said main slider in said retracted position, wherein the locking pin is connected to the movable frame by cam surfaces that operate the locking pin, and - an auxiliary slider having a seat, wherein the auxiliary slider is movable relative to the support along a direction transverse to said longitudinal rectilinear direction by means of the seat and the cam and connected to the main slider by means of the cam, and wherein the auxiliary slider has a top surface with a recessed portion, characterized in that said door-sensing switch includes a fixed contact and a movable contact formed by an elastic plate, wherein the door-sensing switch comprises a door-sensing pin movable in a direction and having an upper end in contact with the elastic plate and a lower end in contact with the top surface of the auxiliary slider, wherein when the auxiliary slider is in the position corresponding to the extracted position of the main slider the door-sensing pin rests on the top surface of the auxiliary slider and keeps the door-sensing switch in the open position, and when the auxiliary slider is in the position corresponding to the retracted position of the main slider the door-sensing pin engages with the recessed portion of the auxiliary slider and the plate, under effect of its own elasticity, comes into contact with the fixed contact and closes the door-sensing switch. - a support intended to be fixed to a frame of the oven, - a main slider movable relative to the support along a longitudinal rectilinear direction, pushed elastically towards an extracted position and intended to be pushed by a door of the oven towards a retracted position, wherein the main slider also comprises a cam, - a locking arm articulated to an articulation portion of the support around an articulation axis perpendicular to said longitudinal rectilinear direction and oscillating around said articulation axis between an unlocked position and a locked position, - a transmission mechanism which connects the locking arm to the main slider and arranged to swing the locking arm from the unlocked position to the locked position and vice versa due to the movement of the main slider from the extracted position to the retracted position, and vice versa, - an electromagnetic switch comprising a door-sensing switch and an electromagnet which drives a movable frame associated with a locking pin arranged to lock said main slider in said retracted position, wherein the locking pin is connected to the movable frame by cam surfaces that operate the locking pin, and - an auxiliary slider having a seat, wherein the auxiliary slider is movable relative to the support along a direction transverse to said longitudinal rectilinear direction by means of the seat and the cam and connected to the main slider by means of the cam, and wherein the auxiliary slider has a top surface with a recessed portion, characterized in that said door-sensing switch includes a fixed contact and a movable contact formed by an elastic plate, wherein the door-sensing switch comprises a door-sensing pin movable in a direction and having an upper end in contact with the elastic plate and a lower end in contact with the top surface of the auxiliary slider, wherein when the auxiliary slider is in the position corresponding to the extracted position of the main slider the door-sensing pin rests on the top surface of the auxiliary slider and keeps the door-sensing switch in the open position, and when the auxiliary slider is in the position corresponding to the retracted position of the main slider the door-sensing pin engages with the recessed portion of the auxiliary slider and the plate, under effect of its own elasticity, comes into contact with the fixed contact and closes the door-sensing switch.