Nearly 40 years after President Lyndon B. Johnson signed into law the Animal Welfare Act, the United States Department of Agriculture (USDA) will begin to oversee breeders who sell pets online, by phone or through the mail based on the same rules that wholesale animal breeders currently follow. By doing so, the USDA is closing loopholes that breeders have exploited since the birth of the internet.

Known as the Puppy Uniform Protection and Safety Act (PUPS Act), dog, cat, and rabbit breeders will be required to apply for a USDA permit, pay a yearly licensing fee, and undergo random inspections, according to U.S. News & World Report. The law applies to any breeders who have more than four breeding females, and is intended to prevent online and mail-order breeders from labeling themselves as retail stores in order to avoid licensing requirements.

“We are enthused about it,” Wayne Pacelle, president and CEO of the Humane Society of the United States, told U.S. News. “It’s been a gaping hole in the Animal Welfare Act regulations.”

Pet stores are exempted from holding licenses because potential buyers can see the animals in front of them, and determine whether or not it’s healthy enough that they want to take it home with them. Now, internet sellers will be required to undergo inspections that would ensure the animal’s health and care.

The rule is expected to cover between 2,600 and 4,640 dog breeders, 75 rabbitries, and 325 cat dealers. They’d be charged a licensing fee based on 50 percent of their gross annual sales, however, if they earn less than $2,000, they’d only have to pay $70. There would be a $10,000 penalty for any single violation, and “each violation and each day during which a violation continues shall be a separate offense,” the law says.

A 2010 report by the USDA inspector general found extreme maltreatment of animals, particularly dogs, at large commercial breeding facilities, called “puppy mills,” where they found severe bug infestations and many buyers reported receiving sick or dying dogs. “There are hundreds of thousands of dogs languishing in small wire cages, denied vet care, and exposed to the elements that literally had no protection under federal law,” Pacelle told the Associated Press. “This turns that around.”

Just last month, one dog breeder, Kim LeMaire, 66, was found to be running a breeding operation while moving from one motel to another in Framingham, Massachusetts. Animal control officers found 19 Maltese dogs soiled with so much urine and feces that, along with a veterinary technician, they had to wear Tyvek suits, boots, and gloves while shaving off their matted fur.

Jean Callahan, who gave LeMaire a check for $900 in March, and still hasn’t gotten a dog said, “I am very upset about the $900, but not as much about that as about the cruelty to animals.”