The rules that apply to every stain
Three habits save most rugs. Blot, do not rub — rubbing drives the stain into the pile and fuzzes it. Work from the outside of the stain inward so it does not spread. And test any cleaner on a hidden corner first, because the cure can be worse than the stain on a rug that bleeds dye. Deal with it fresh; a spill lifted in minutes often leaves nothing, while the same spill left overnight sets.
Red wine, coffee and tea
Blot up all you can, then flush with cool water and blot again. A few drops of mild dish soap in cool water lift most of what is left; for red wine, cool water and steady blotting beat any folk remedy, and the key is not letting it dry. Do not use hot water, which can set the tannin, and do not scrub.
Pet accidents, blood and other protein stains
Protein stains set with heat, so always use cold water on them. Blot, rinse with cold water, and for pet urine use an enzyme cleaner that breaks the protein down rather than masking it. Never put hot water or steam on urine or blood — it bonds the stain and the smell in permanently.
Grease, oil and ink
Greasy stains want a little warm water with mild dish soap, blotted through. For ink, dab (do not soak) with a small amount of isopropyl alcohol on a cloth and lift it, testing a hidden corner first because alcohol can affect some dyes. Wax and gum come up better chilled — harden them with ice, lift the solid off, then treat what remains.
The stains a home cannot fix
Some stains are past DIY: anything old and set, a dye-based stain that has migrated, a mark on wool, silk or a hand-knotted rug, or a patch where the rug colour itself has bled. Pushing harder with stronger chemicals usually spreads the damage. A professional can dust, test the dyes and treat the stain in a controlled wash — and sometimes say honestly that it will not fully lift, which is better than finding out after you have set it.

