Mix 1 part cayenne pepper to 10 parts of water. Dissolve the pepper in the water and pour into a spray bottle.
Spray lightly over your lawn. Dogs tend to smell the area before doing their business, and the scent of the cayenne will mask other scents. It will also burn the dog's nose and make it less able to pick up scents.
Sprinkle ground cayenne pepper in areas where male dogs usually lift their legs, such as around the bases of gateposts or small shrubs. This will discourage dogs from spending time near these objects.
Watch out for visiting dogs that find new spots on your lawn to use. If this happens, remove any feces and water the lawn to dilute the scent of urine. Follow up with a reapplication of the cayenne spray or powder.
Reapply the cayenne pepper after every rain. Renew the spray mixture weekly to prevent it from becoming stale and losing the strength of its scent.