2006 Subaru Forester gremlin in the headlight

You ever see the Bugs Bunny cartoon from WWII where the gremlin is sabotaging the aircraft? Well, the little bugger is working on my car, now!

The left front headlight -sometimes- does not come on when I turn on the headlights. I can easily make it come on by giving the lens cover a gentle “bop” with my fist; it’s not even a hard rap, just a bump, really. Alternatively, if I drive with the light out and hit enough bumps in the road, it will eventually come on by itself.

On the contrary, if the light is functioning, it will NOT go out just from hitting bumps in the road.

I’ve replaced the bulb, it’s not that. I’ve checked the wires, they’re free of corrosion. I’ve used dielectric grease on the connections, to no avail.

I’m assuming there is a short or loose connection somewhere but I cannot find it.

Does anyone have any idea where/what it could be?

There are electrical connectors between the wiring harness and the light sockets that can become exposed to the elements… and to corrosion. Ask a Subie parts widow guy to help you with a wiring diagram (not a schematic, a wiring diagram shows the physical wires and connectors and where they are on the car rather than the electrical design). Clean and check the connectors.