You can’t. There are some ways to block off rooms or areas to limit access to your rugs but let’s remember that dogs and cats are different than people. It all comes down to the sense of smell.
Men and women have different strengths of sense of smell. A woman’s sense of smell is generally 6 times stronger than that of a man. A dog’s sense of smell is 600 times stronger than a man’s. Think of a blood hound tracking someone’s scent for hundreds of miles.
Now, let’s remember what a wool rug is. It’s the hair from sheep. Dozens of different sheep are used to make a rug. The dyes are sometimes set with urine from other animals. Taking all of this into account, imagine what is running through your pet’s mind as they try to find the zoo that has invaded their living space. They don’t see the intruders, but they can sure smell them. So they immediately want to roll around, lie on, and yes, mark the rug.
There have been many, many products over the years that promise to keep the pets away but none of them have proven effective. You can always use toddler gates to block entrances to rooms you don’t want the dogs to enter. There are even some companies that can install the same type of sensors that are found in your yard to prevent the animals from running into the street for indoor use, but there is no powder or spray that will work to keep them off of your rugs.