An automatic height adjustment system for a header (10, 110, 210, 310) of an agricultural harvester is provided. The system utilizes detection of a light beam (154, 254, 354) at or near the skid plate (34, 134, 234, 334) of a header (10, 110, 210, 310) to adjust the height of the header (10, 110, 210, 310). The apparatus includes an emitter (150, 250a, 250b, 350) for emitting a beam of light to a receiver (152, 252, 352). A sensor guide (260, 260a, 360a, 360b) is positioned between the emitter (150, 250a, 250b, 350) and the receiver (152, 252, 352). The sensor guide (260, 260a, 360a, 360b) is in communication with a controller (156, 256, 356). If the body of the sensor guide (260, 260a, 360a, 360b) is detected as blocking passage of light to the receiver (152, 252, 352), the header (10, 110, 210, 310) is raised or lowered.