For cats, scratching is an essential means of communication. While cats scratch to groom their claws, they also claw surfaces to create visual signposts for themselves and to mark their territories with the scent in their paw pads. Some cats are horizontal scratchers who prefer low surfaces, such as cardboard scratching pads or rugs. Others like to reach up high to scratch vertically. Although deterrents will keep your cat from scratching the furniture or a door, compromising by giving the cat a scratching surface that's acceptable to both of you is often a more effective solution.
Place a tall, stable scratching post next to the door. To please a cat who's a vertical scratcher, the post should be at least 32 inches high and should have a wide, stable base. Entice the cat with catnip. Rub it on the post, and sprinkle it on the base.
Put a hanging scratcher on the doorknob and rub it with catnip to make it appealing to the cat.
Hang a wall-mounted scratcher on the wall next to the door. Try to place it at the same height as the area of the door the cat scratches and rub it with catnip.
Put double stick tape on the door in the place where the cat scratches. The cat won't like the sticky feeling on its paws. Pet supply stores sell clear double-sided tape designed to keep cats from scratching furniture. You should be able to remove the tape after a few days.
Attach bubble wrap to the door in the area the cat is scratching. The sound of claws popping bubbles will startle the cat and discourage scratching. After popping the bubbles a few times, the cat will decide it no longer likes scratching the door. Then you can remove the bubble wrap.
Place an electronic pet deterrent that causes a tingling sensation when stepped on in front of the door. It won't harm the cat, but the cat won't want to stand on it. Most pet supply stores sell electronic deterrents.
Praise your cat when it scratches the alternative surface you've provided instead of the door. Cats respond better to positive reinforcement than they do to punishment.
Spraying your cat with water will just teach it to scratch the door when you're not looking and could make the cat afraid of you. Never use a spray bottle as a training device for cats.