Many dog owners are exasperated and embarrassed to see their pet scooting along on the rug due to anal irritation. Traditionally, owners attributed that to "worms". But "worms" are almost never the cause of this problem unless those intestinal parasites are causing chronic diarrhea as well. The misinformation about worms got started because humans get pinworms. Pinworms do often cause your rear to itch. Horses and rabbits get pinworms. Dogs and cats do not get pinworms. You need to look for the source of the problem elsewhere.
In a few female dogs, scooting can be due to vaginitis or a UTI. But the vast majority of dogs that scoot do so because have enlarged anal sacs (anal glands) that do not empty properly. Your dog's anal sacs are two pea-to-grape sized sacs on ether side of its rectum. Dogs, cats and other animals have these sacs to impart an odor to their stool that is unique to that animal.
The material these glands secrete is extremely bad-smelling to us, but not to our pets. It is how a dogs recognize who has eliminated on their turf, who is passing through the neighborhood. In a normal dogs, the firm, segments of stool (feces) press on these sacs as they pass them. That pressure is enough to empty normal anal glands through two tiny tube or duct (one for each side) that exists just inside its anus.
However, if their stool is too soft or hard or if the pet has a tendency to thick, anal gland secretions (perhaps due to dehydration?), the sacs do not empty normally. Eventually they swell, become itchy, enlarged and inflamed. In extreme cases, one or both sacs will form an abscess and eventually burst. These abscesses often close only to burst again. Eventually they form a permanent pathway (fistula) from the gland to the surface of the skin. Besides scooting, pets with this problem generally spend a lot of time licking the area under their tail. Enlarge the second image at the top of this page to get a better idea of what is happening.
In approximately 60% of the cases I see, the problem was due to feeding the dog an inappropriate diet or table scraps. Spicy barbecue, marinated foods, ice cream, pizza, party snacks, sharing midnight snacks, etc. About 10% the pet were “garbage hound” foraging through the thrash eating “Big Mac” rappers, plastic objects, dirt, gravel, leaves, sand, etc.. Others ate inappropriate stuff due to their separation anxiety issues. Some cases are due to pets being overweight or apparently just genetically predisposed to the problem. Some toy poodles and miniature schnauzers just seem to have very thick anal gland secretions. A few rare cases are due to intestinal parasites (hookworms or whipworms) which can cause chronically loose stools which do not express and empty out the anal sac contents normally.
When the problem is tended to early, a gentle massage of the area around the rectum with a damp “Kleenex” every week is often enough to empty the sacs. Experienced groomers know how to do it. There are probably instructional videos on YouTube as well. I try to instruct my clients how to do it by observing me perform it properly the first time. The secret is be gentle. Persistent light pressure rather than a heavy grip. One must never massage harder than one would squeeze a grape without rupturing it. Once the gland is inflamed and painful, never try to express the gland yourself. In those dogs, the sacs are so large that they must be empties using a latex finger cot and lubricant through the anus. This is not a procedure an average pet owner should ever attempt. It is also something that takes a second person to restrain the dog. Those glands are painful. The dog may bite. In other advanced cases, the tubes leading from the sac to the rectum are scarred shut. In those cases, or when the problem reoccurs again and again, I remove the glands surgically. First I treat the dog with multi-day course of antibiotics. The surgery corrects the problem permanently. It must be done very judiciously so as not to damage the nerves that keep the pet's anus closed and carefully so that the scant surrounding tissue does not scar and limit the pet's ability to defecate normally. When scaring does occur, the anus can be slowly stretched over a month or so with probes of larger and larger circumference.
Once the glands are empty, and inflammation has subsided, dietary management that produces robust, clay-textured stools almost always eliminates the problem. Higher fiber diets can help in this respect. If your dog will eat broccoli and cauliflower, that will suffice to keep its stools soft. Too much stool-softening will cause the problem to return. These glands function best when the stool is of normal consistency. Dogs with chronic constipation can suffer anal gland impactions and scooting as well.
Dogs with normal stools that do not have a history of anal sac impactions, scooting or licking their rear do not need to have their anal sacs periodically expressed by you or your groomer. It is normal for there to be some oily smelly fluid in those sacs at all times.