NEW YORK ( MainStreet) — It's been clear for a long time that trying to type or even read a text message while driving a vehicle can be hazardous to your health, as well as that of your passengers and passersby. But with nearly all states now banning texting while driving, and most of those treating it as a primary offense akin to speeding or running a stop sign, it can now be hazardous to your wallet as well, in the form of higher insurance premiums.

The legal prohibition on driving while texting is all but universal. Forty-one states and the District of Columbia ban all texting while driving, according to the Insurance Institute for Highway Safety. Six more -- Mississippi, Missouri, New Mexico, Oklahoma, South Dakota, and Texas -- apply bans just to novice drivers.

Only Arizona, Montana and South Carolina have no statewide bans. And many cities and counties have enacted local bans, and more are doing so all the time. Basically, there is no place you can assume it's legal to text and drive.

Furthermore, in nearly every state with a ban, it's treated as a primary offense. That means if an officer sees a driver texting, he or she can pull the vehicle over and write a texting ticket. That makes a big difference to, among other things, your future insurance premiums.

Texting offenses can be coded as a moving violation, like speeding, says Bill Windsor, associate vice president of consumer safety for Nationwide Insurance in Columbus, Ohio. "These types of tickets can impact an insured's premium rate," he says. In states where texting while driving is a secondary offense, drivers can't be pulled over for just texting and driving. An officer has to observe another dangerous behavior such as erratic driving. "In many states where texting is a secondary violation, the violation would typically be coded as an administrative offense, which would not affect the insured's premiums," Windsor says.

You can find out your state's approach to texting tickets at the Insurance Institute for Highway Safety website. But exactly how much a texting ticket will affect your premiums depends on several other factors, including your particular insurer. "Different auto insurers weigh moving violations -- such as a speeding ticket as compared to one for texting while driving -- differently," says Mike Barry, vice president with the Insurance Information Institute, a New York City-based industry group.

Insurers assign premiums in part based on how many points are on a motorist's driving record kept by the state's motor vehicle department. All else equal, the fewer points, the lower the driver's insurance premium will likely be. Points may be added for a ticket for reckless driving, a conviction for driving under the influence of drugs or alcohol, or even improperly using a child's safety seat.