Every door comes to a time when it will not latch correctly, and there are various reasons why. Damp weather or heat may be warping it; ground that has frozen under the door may also cause it to not close properly. Even usual wear and tear can contribute. Fortunately, there are several ways to fix a door that will not latch.
Step 1 - Check Hinges
If the door is not latching properly, the easiest place to start with is with the door hinges. When the hinges are loose the door will travel up and down while it is being opened and closed. If the door is sagging and will not line up with the latch, check the door hinges. Lift the door up to relieve the pressure on the hinges and tighten the screws. If the screws have been stripped, they will not tighten in the holes and you'll need new ones. In that case, take the hinges from the frame. Drill new holes that are slightly smaller than a wood dowel. Hammer in the dowel and cut off the excess. Reinstall the hinges and attach the screws into the dowel.
Step 2 - Check the Latch and Strike Plate
When you open the door you will see the latch on the door and the strike plate on the door jamb. Check both for loose screws. Tighten any that might be loose and then check the door again. If it latches securely, the problem is solved. If not, there is more to look for.
Slide the latch in and out to see if it moves smoothly, and if not the door knob may be too tight. Loosen the knobs a little to relieve some of the pressure on the door and to free up the latch a little. Try applying WD-40 or a silicone lubricant if the latch is still catching in the door.
Step 3 - Align Strike Plate
If the door still does not latch properly, then it could be that the strike plate is not aligning properly with the latch. Close the door and check to see if the strike plate is too high or too low. Also check to see that it is aligning left and right. You can fix this problem in three different ways. For small adjustments, you can use a metal file on the strike plate to open it up a little more for the latch to set properly. You can also place a piece of wood in the strike plate and hammer the wood up or down to move the plate until it aligns.
The last plate repair suggestion is one that you can do easily. Simply unscrew the strike plate and reattach it at a different height—either lower or higher—depending upon how unaligned the plate was. Mark on your door jam with a pencil, or something else easy to wash away, where the latch hits so you only need to reset your strike plate once.