Remove the mattress and box spring from the bed frame. In many cases, the bed will not have a frame.
Slide the bed frame away from the wall so you can access the head of the bed.
Measure the width of the bed frame with a tape measure. Measure the height of the bed frame from the floor to the top of the frame with the tape measure. Select a premanufactured headboard that measures the same width of your frame and at least 24 inches taller than your bed frame. This will allow 2 feet of the headboard to extend from the top of the frame. You can select a hardboard that extends higher if you choose
Place the headboard against the head of the bed and transfer the mounting holes on the headboard onto the back of the bed frame. Place the headboard off to the side for now.
Place the bed frame on its side so you can access the backside of the board installed at the head of the bed. The mattress rests on a platform mounted to the top of the bed frame. This prevents you from accessing the area without putting the frame on its side.
Drill pilot holes large enough to accommodate the bolts you plan to use for attaching the headboard to the bed frame.
Place the headboard on its side and line up the bolt holes in the bed frame and headboard.
Push the bolts through the headboard and into the bed frame. Secure the bolts with nuts and a wrench.
Place the bed frame upright in its normal position and slide it against the wall. Place the box spring and mattress back onto the frame.