Problem with my headlights

I have been noticing that when i’m driving that my headlights will turn off, and then after a few seconds turn back on… The parking lights dont do this, just the headlights. I know its not the bulbs, or the connections at the headlights, because both of them do it at the exact same time.

Any suggestions will be appreciated… Thanks.

I fixed it… It was the headlight switch. just pulled one at pick n pull, and installed it yesterday.

good to know!