Open the door.
Turn each hinge screw clockwise with a Phillips screwdriver until they're all tight. This includes screws holding the hinge to the doorframe and the door – generally between six and eight screws per hinge. Remove any screws that don't tighten by turning the screw counterclockwise with the Phillips screwdriver.
Install a 3-inch wood screw into the opening left by a stripped screw, by turning it clockwise with the Phillips screwdriver. Close the door.
Open the door if it still hits at the top. Apply masking tape to the door's inside face – the side facing the doorframe. Close the door while standing in the opening.
Pull the tip of a sharp pencil along the top of the doorframe to mark the masking tape. Open the door.
Set up a stepladder next to the open door. Slide a wood rasp along the top of the door until 1/32 inch of wood remains above the pencil line. Attach a piece of 60-grit sandpaper to a sanding block. Sand the top of the door until you reach the pencil line. Remove the masking tape.
Apply polyurethane sealant to the top of the door with a paintbrush. Let the polyurethane dry for six to 12 hours before allowing the door to close.