Short answer
A door or window sensor pairs a magnet on the moving part with a switch on the frame; opening the door separates them and signals the alarm panel. Put one on every exterior door and on windows someone can reach. Contacts do not detect broken glass, so large windows and glass doors need a second layer.
In this article
How do door and window sensors work?
A door or window sensor is a two-part contact: a magnet mounted on the moving door or sash, and a sensor with a magnetic switch mounted on the frame. When the two are aligned, the switch holds one state. Opening the door pulls the magnet away, the switch changes state, and the sensor reports the opening to the panel.
The switch inside is usually a reed switch, two thin metal strips in a sealed glass tube that move together or apart in a magnetic field. It has no moving parts beyond those strips, which is why contacts last a long time. What the panel does with the signal depends on its state. Disarmed, an opening may only sound a chime or show on the app. Armed, it starts an entry delay on doors designated for coming home, or triggers the alarm immediately on doors and windows that should never open while the system is on.
What is the difference between wired and wireless door sensors?
Wired sensors connect to the panel by a cable run inside the wall or frame and have no battery. Wireless sensors contain a battery and a small radio that sends each opening and closing to the panel. Both detect the same event; they differ in installation work, maintenance, and the way each one can fail.
Wired contacts are often recessed into the door edge and jamb, where they are nearly invisible once the door is closed. They are simplest to install while walls are open; in a finished house, fishing cable to each door and window takes time and can mean small repairs. Wireless contacts mount on the surface with screws or adhesive and go in quickly, but they need a battery change on the manufacturer's schedule. Many professional panels supervise wireless sensors, checking in with each one periodically and reporting one that stops answering, so a dead battery shows up as a trouble alert rather than silence.
Which doors and windows need a sensor?
Every exterior door needs one, including the door from an attached garage and any basement or cellar door. Windows are a judgment call: ground-floor windows and those reachable from a deck, porch roof, or stairs are the usual candidates. Upper-floor windows with no access route are often left to interior motion sensors instead.
Some openings need a different approach. A sliding glass door takes a contact on the moving panel, and a fixed panel beside it has nothing to open, so it relies on other sensors. An overhead garage door usually uses a tilt sensor or a heavier contact designed for the gap and movement of that door. Windows that stay open for air in summer can take a second magnet at a vent position, so the panel can be armed with the window partly open.
What can door and window sensors miss?
A contact sensor reports only that a door or window moved. It does not hear glass breaking while the frame stays shut, notice someone cutting through a screen, or stop a door that was propped open before arming, although most panels warn about an open zone or refuse to arm until it is closed or bypassed.
That is why contacts are the first layer rather than the whole plan. Large picture windows and glass doors are better covered by an acoustic sensor that listens for shattering, explained in our guide to how glass break sensors fill that gap. Interior motion sensors cover the rooms between the perimeter and the bedrooms. Our overview of the main types of home security sensors shows how those layers fit together.
How do you keep door and window sensors reliable?
Reliability comes from alignment and testing more than from the sensor itself. The magnet and switch must sit within the gap the manufacturer specifies, on a door that closes the same way every time, and each zone should be named on the panel so an alert says which door opened. Every contact should be tested after installation.
Doors move over time. Hinges sag, frames shift with the seasons, and weatherstripping changes how a door seats, so a contact that read cleanly at installation can start reporting an open door that is shut. Opening each protected door and window with the panel in test or chime mode, a few times a year, catches that drift early. Replacing batteries on wireless contacts as a set, rather than one at a time when a trouble alert appears, can avoid a string of low-battery warnings. Planning contacts room by room during a professional security system installation also settles which doors get an entry delay and which do not.