This video shows you a good method for removing coffee stains from your carpet. One of the major factors is getting coffee stains out is getting to the stain quickly and removing it before it sets in. Once the stain has set in it is much more difficult to remove.
As a professional carpet cleaner in Tampa FL I would make one minor adjustment to this cleaning solution. Use only 1/2 teaspoon of dish washing detergent. These detergents have powerful soaps in them and they can leave soapy residues that will attract dirt and soil back to the original spot. There is no need to use more than a few drops of dish washing soap to get what you need to remove a fresh coffee stain.
If your not seeing results after a few attempts with this cleaning solution, try replacing the water in the cleaning solution with soda water. The carbonation solution will add to the cleaning power and help lift any remaining coffee to the surface. Finally, make sure to blot up the extra moisture. No need to rub the carpet, you could damage it.
If you're still having difficulty removing coffee stains from your carpet. Call Chem-Dry of Tampa FL for professional help