A device is for the electrotherapeutic treatment of headaches such as tension headaches and migraines. An electrode support (10) has a shape and is size selected so as to allow, independently from the subject, the excitation of the afferent paths of the supratrochlear (2) and supraorbital (3) nerves of the ophthalmic branch (1) of the trigeminal nerve. An electrical circuit includes a programmable signal generator suitable for creating pulses of a duration of between 150 and 450 microseconds with a maximum increase in intensity of 0 to 20 milliamperes at a rate of less than or equal to 40 microamperes per second and with a step up in intensity not exceeding 50 microamperes.