Measure the area of the pegboard between the outer-most corner holes. Transfer these measurements onto the closet door, marking an “X” where each corner hole goes.
Measure the thickness of the door. Mark that thickness on your drill bit with a piece of masking tape to ensure you don’t drill through the door. Create four pilot holes.
Insert a screw through each of the four corner holes and into a pegboard spacer, which gives you room for hooks. Line up the screws and spacers with the pilot holes. Screw the pegboard into place to secure it to the closet door.