The following is an excerpt from Petfinder.com’s The Adopted Dog Bible
You know all that doggy butt-sniffing that we humans seem to find either appalling or hilarious? Ever ask yourself what that’s all about?
You may not think of that dog in your bed as a predator, but at heart, he is. And like all predators, your dog has anal sacs (anal glands) located on both sides and slightly below his anus. They produce fluid with a distinctive odor that identifies him and tells other dogs his sex, approximate age, health status, and other things.
Healthy anal glands express, or empty, this fluid when the dog has a bowel movement. Unfortunately, some anal glands don’t work as they should because of inherited malformations, or because of a history of poor-quality foods that produce poor-quality bowel movements.
If the anal glands don’t empty properly, they can become impacted, making bowel movements difficult or painful, and potentially leading to infections or abscesses.
It’s not uncommon for a rescued dog to have a history of anal gland problems. Your dog may damage the delicate tissue around his anus in his attempts to relieve his own discomfort, so if you see him biting at his butt, or scooting it along the ground, take him to the vet.
Impacted anal glands can often be relieved by manually expressing, or squeezing out, the fluid they contain. This is a very smelly process, but if you’re game you can have your vet or groomer teach you how to do it. Most people whose dogs need their anal glands expressed periodically prefer to pay to have it done.
If your dog’s anal glands get impacted frequently, ask your vet to recommend a high-fiber diet to create bulkier stools. If that doesn’t work, and if your dog has repeated infections or abscesses from impaction, the anal glands may need to be removed.