Whining for attention is the quieter cousin of demand barking: a dog has learned that whining brings you over, so they keep doing it. Like every one of the everyday annoyances, it persists because it has paid off. The fix is to make whining stop working while you make quiet, settled behavior the thing that earns your attention.
Rule out a real need first
Before you treat whining as attention-seeking, make sure it is not a genuine request: a full bladder, hunger, pain, or distress. This matters. Ignoring a dog who actually needs something is both unkind and counterproductive. Once you are confident the basic needs are met and there is no sign of pain, you can address the learned, attention-seeking version.
Stop the whining from paying
The mechanics are the same as the other self-rewarding habits: the attention your dog is whining for should not arrive while they whine, and it should arrive generously when they are quiet and settled. Calmly withhold the look, the touch, the talking when the whining starts, and the instant your dog goes quiet, reward that. As with door manners, expect them to try harder before they give up, and do not cave during that brief escalation, or you teach louder, longer whining.
Build a settled default
Give your dog something better to do than whine for you. Reward calm settling on a bed or mat, the same way you reward calm choices everywhere, and make sure they get enough enrichment and appropriate outlets so they are not whining out of sheer boredom. A dog with appropriate ways to spend energy, including the right kind of social time, whines less; our honest look at dog parks is a good reminder that the outlet has to actually suit your dog.
When whining is stress, not demand
One important caveat: not all whining is attention-seeking. A dog who whines when left alone, in the car, or around specific triggers may be stressed or anxious, and that is a different problem that responds to lowering arousal, not withholding attention. Whining that rises with trigger stacking, or that shows up alongside the body language of a fearful dog, is a signal to reduce stress and build confidence, not to ignore. When in doubt about which kind you are seeing, treat it as stress and get a professional eye on it.