Depends on your electrical system, I find. Good earths and clean supply through a quality relay seems to help a lot. The sparkies reckoned inrush currents were killing them when too high.
If it's on trucks or other mobile equipment, vibrations don't help much either. We had a fleet of Volvos that ate lights every month or so (rubbish trucks, plenty of dust and rough roads). A heat-resistant foam rubber pad between the bulb and the reflector socket got us up to about 3-4 months, at least on the headlights. Similar vibration absorbers on the taillights helped with those globes too.
Obviously you want to be very careful about the heat resistance with headlight globes!