Why the smell lingers
Urine contains compounds that dry into the carpet fibers and the padding underneath. The smell can come back when the carpet gets damp, and dogs can smell it far better than people can. A spot that smells like urine may draw your dog back to the same place, which is why a thorough clean matters.
Act quickly, and blot
Fresh accidents are easier to clean. Blot up as much liquid as you can with paper towels or a clean cloth. Press down rather than rubbing. Rubbing pushes urine deeper into the fibers and spreads the mess.
Rinse and blot again
Dampen the area with cool water and blot again. This helps dilute what is left. Keep blotting until the cloth comes up mostly clean.
Use an enzymatic cleaner
An enzymatic cleaner contains enzymes that break down the proteins in urine. These are the parts of the stain and smell that are hardest to remove with ordinary cleaners. Follow the label. Most products need you to soak the area for a set time, then blot and let it air dry. Test any product on a hidden corner first, since some carpets can change color.
Deal with old or deep stains
Old accidents are harder. The urine may have soaked into the padding or the subfloor. If the smell comes back after cleaning, the urine is still there. You may need to pull up a corner of the carpet, clean the padding, or call a professional carpet cleaner.
A UV or blacklight can help you find old urine spots, since dried urine often glows under this light. Mark each spot so you can treat all of them, not just the one you can smell.
Products to avoid
Avoid ammonia-based cleaners. Ammonia breaks down into a smell that resembles urine, and your dog may read that as a sign to mark again. Do not mix cleaning products, especially bleach with ammonia-based or acidic cleaners, because the combination can release harmful fumes. Use one product at a time and keep the room ventilated while you work.
Dry it fully
Carpets that stay damp can grow odors and help bacteria grow. Let the area air dry completely, with a fan if you can. Once it is dry, check for any lingering smell by sniffing at carpet level.
Prevent the next accident
Clean spots are less tempting if your dog has a clear place to go and a consistent routine. If your dog is still learning, the plan in how to potty train a puppy explains timing and rewards. If your dog keeps returning to the same spot, a barrier or a pet bed can help while you retrain.