The first thing to remember is to act as quickly as you can. Time is not your friend, as delaying tending to the spill may cause it to become a permanent stain. Blot the area with a clean white cloth; paper towels work well in a pinch.
For red wine first try a detergent solution to clean the spill out of your carpet. Don’t use a stronger concentration than this. Mix ¼ teaspoon of liquid dishwashing detergent with one cup of lukewarm water. It’s a good idea to test this solution on an area of carpet that is hidden to make sure it is not going to cause discoloring. Work this solution into the spill – gently – do not rub. Work from the outside edges of the spill to the center. Let the solution sit on the spill for a few minutes. Blot. Have patience. Continue to blot and use the cleaning solution until there is no more transfer of the spill onto your white cloth. If you cannot remove all of the stain with the detergent solution try this one – 1 cup white vinegar mixed with two cups of lukewarm water. Be sure to pretest!
When there is no more transfer of the wine to your white cloth rinse the area with cold water. Continue to blot until all the moisture is removed. You must be certain that all of the cleaning solution is out of the carpet, otherwise it will attract dirt.