(WHNT) – If you travel to work, school, or really anywhere while it’s raining, then you probably realize just how hard it can be to see the roads or even other vehicles you pass. Especially if you or someone else you pass by doesn’t have headlights on.

But is it illegal to not have your headlights on when it’s raining?

The obvious time to use your headlights is from sunset to sunrise, but there are a couple of other times laws state you should have them on.

Alabama Law says you must have your headlights on from a half hour after sunset to a half hour before sunrise, during periods of limited visibility like when fog is present, and anytime the windshield wipers of your car are in use continually.

Turning on your headlights when there is rain, sleet or snow not only increases your own visibility while driving but allows other drivers to see you driving by or driving behind them. Headlights can also help you see pedestrians or unexpected hazards when visibility is low.

The laws in Alabama also say, “you must dim your headlights from high to low beam when you are within 500 feet of an oncoming vehicle or within 200 feet of a vehicle traveling ahead of you.”

According to the Alabama Law Enforcement Agency, you can be pulled over and given a ticket if your headlights aren’t on at night or when your windshield wipers are on.

Alabama is one of 18 states that legally requires you to have your headlights on when your windshield wipers are in use. The other 17 states that require this are:

  • Arkansas
  • California
  • Delaware
  • Illinois
  • Kansas
  • Louisiana
  • Maine
  • Massachusetts
  • Missouri
  • New Jersey
  • New York
  • North Carolina
  • Ohio
  • Pennsylvania
  • Rhode Island
  • South Carolina
  • Virginia

Even if it’s daytime, if you have to have your windshield wipers on and are not parked, headlights are required.