Fill a large pot with cold water -- enough water to fully cover the size of your crab -- over high heat. Salt the water with a heavy hand. It should be salty like the ocean. Note: some people like to season the water with Old Bay seasoning and/or bay leaf; this is really only helpful if you are going to be serving the crab meat as is after cooking and cleaning the crab and not using the meat in another Dungeness crab recipe.
Using tongs, very carefully pick up the fresh crab in the center of its body and place crab into the pot. Bring the water to a boil. Boil for about 10 to 20 minutes. The color of the crab shell will change to a bright orange when it's fully cooked.
Use tongs to take the crab out of the pot and transfer to a plate or wire rack to cool down.
How to clean Dungeness crab
Once the cooked crab is cool enough to handle, start by removing the "apron" of the crab. This is the triangle part of the crab shell. You're simply going to grab hold of the top of the triangle and pull it toward you and off the shell.
Next, you're going to separate the top shell of the crab. The easiest way is to find the small hole between the body of the shell and the top shell of the crab. Hold the top shell of the crab so that it faces down and hold it with one hand while you pull open the body of the shell up and open and removing it with the other hand.
Now you'll be holding the top shell with the crab butter or crab juices in the top shell. You can either reserve this to make crab butter, or discard it. You can also either discard the top shell or you can rinse it out and clean it to use as a serving dish for your crab recipe.
With the crab open, you'll now see the mandibles and the gills. The gills are in two rows at the top of the crab body. They're feathery and don't taste good, so go ahead and remove those and discard them. The mandibles are two pointy parts at the top of the crab that you can snap and break off of the crab; discard those as well.
Now you can rinse off the crab guts that are hanging out in the crab with cool running water. You should only have crab meat left in the crab. Pat the crab dry with paper towels.
Notes
Storage: If you're not using the cooked and cleaned crab right away, remove the crab meat and store in an airtight container for up to three days. Or, freeze the crab in its shell in a freezer bag for up to one month.