Most adult Corn Snakes will live comfortably in a 20-gallon tank provided that you let them out for exercise. Bigger is always better in this case though and a 30-gallon or larger would be very nice. The tank must have a locking screen top. This is very important. Most pet stores sell clips that lock the top down securely. Buying 4 clips will ensure that you won't be doing any "snake hunting" around the house. People will tell you to just stack books on top, but beware, snakes are escape artists that can wriggle through a very small hole. Enough said.
Snake Home Interiors
Some good substrates for the bottom of the tank are newspaper, pine bark chips (from a pet store, no pesticides), or aspen bedding. Newspaper is probably the best substrate available. It is clean and cheap. When it gets soiled just crumple it up and throw it away. Although seemingly perfect in every way, unfortunately newsprint is not very eye appealing. This is where pine bark chips come in. If properly obtained (through a reputable pet store) they are relatively clean. The soiled pieces can be scooped out as they appear and the whole tank can be emptied on a regular basis and disinfected. Aspen bedding is my personal favorite. The manufacturers claim the pieces are small enough so that if ingestion occurs no harm will come to the animal. In fact, I have seen all my snakes ingest the Aspen at one time or another. I have used it successfully for several years now.
Pine shavings, corncob, and sand are no good because they can easily become ingested and lead to impaction. Dirt from outside is not suitable because it has bacteria and could have parasites in it. (Dirt can be used in emergency situations, although I can't imagine what that could be. Just put the dirt in a pan and bake it at 300 degrees for about 15 minutes. Let it cool first before putting it into the cage, obviously.)
Your Corn Snake needs a hide box in which to feel secure. I have used many different objects for this purpose. Half a log, a small cardboard box with a hole cut in the side, various fake logs from the pet store, and even a heavy plastic cup if there's nothing else around. The shelter should be slightly larger than the animal so it can touch all the sides and feel cozy. Whatever you choose it should be easily cleaned or disposed of (in the case of the box) when soiled.
A Corn Snake of all snakes definitely needs a climbing branch. (If the branch comes from outside you may either bake it in the oven like the dirt, see above, or you may pour boiling water over the branch outside. Baking is more thorough.) The best way to secure the branch is to extend it from the bottom of one corner diagonally to the opposite corner near the top. (By the way, be careful when opening the top that your snake is not perched on top between the cage and the screen. You don't want to squish anyone!) Aside from the branch other decorations can be used like plastic trees and such. Just make sure they are easy to clean.
Your Corn Snake is going to need a water dish filled with clean water at all times. It should be big enough for him to get his whole body into. Yes, they like to "take a bath" once in a while. Many times when your snake is going to shed he will take a dip in his water dish to help the skin come off. Unfortunately most snakes also like to relieve themselves while in water also. This is just a fact of life and you must be prepared to change the water frequently. Actually it makes cage cleanup very easy when they go in the water. I've had some snakes that go every time in their water and I've had others who never go near the water except to drink. Go figure.
All snakes are Poikilothermic (cold-blooded). This means that they cannot regulate their body temperature like we can. Without proper heating their tank can get too cold and they can die. If their tank gets too hot they can die from overheating, as they have no way to lower their body temperature. Corn Snakes are from North America so obviously they come across cold temperatures. Out in the wild they hibernate. If you don't keep a constant temperature year-round in your Corn Snake's cage he too will go into hibernation.
If you want to cool your snakes down for breeding you need to let them get all the food out of their systems first. Don't feed them for a couple of weeks prior to cooling and make sure that they defecate also. This is so the food doesn't just rot in their stomach. Obviously you do not want to feed them while they are cooled down. If on an off chance they took the food they wouldn't be able to digest it without proper heat. Personally I recommend keeping your Corn Snake at an even temperature year round. 75 degrees is a nice average temperature that they seem to be happy at.
One of the best types of heat that I have used for Corn Snakes is the undertank pad from Repti-therm or heat tape manufactured just for the herpetological community. The Repti-therms have always worked well for me but I've heard on a few occasions that they have gotten hot enough to crack the bottom of the tank. Obviously this is not good. If you choose the Repti-therms please check them out from time to time to see that they are not getting too hot. Basically, if you cannot hold your hand on the heater it is too hot. For safety I usually put newspaper down under the bark chips or aspen bedding. This dissipates the heat so as not to burn your snake. Many times snakes aren't bright enough to realize they are getting burnt and will stay on the hot area until much damage has occurred.
The heat tapes as far as I know don't get as hot as the Repti-therms. You can buy the heat tape in strips that are 3" or 11" wide and as long as you want. This is ideal when more than one tank is going to be heated. In any case your snake needs a temperature variant. Place the heating pad at one end of the tank not in the center. This allows the snake to sit on the heat, near the heat, or away from the heat. A good variant for a Corn Snake is from 65-82 degrees (room temp. at one end with the heating pad at the other end). This is a natural variant the snake would find in the wild on a nice July day. 82 degrees in the sun and 65 down in the shade under some leaves. The 3" heat tape can be use similarly by letting it run along the backside under the tank. (11" tape would be too wide for a 20-gallon tank.)
Your Corn Snake will eat approximately one mouse per week depending on the size of the snake and the size of the feeder mouse. As a rule don't feed rodents that are more than 1 1/2 times the width of your snake's head. While it is possible for your snake to eat bigger mice than that it is also possible for him to choke on it. Better safe than sorry.
Now for the live versus dead debate: I am wholeheartedly for feeding dead food to snakes and lizards. Corn Snakes in general adapt well to eating pre-killed rodents. The reasons for feeding pre-killed are simple. Live mice and rats can and will bite your snake. If your snake is not hungry for whatever reason an unattended mouse can do major damage to the captive snake. Constrictor snakes, of which your Corn Snake is one, don't really have much in the way of defense. In the wild if threatened chances are they will flee. There is nowhere to flee to in your snake's tank. Another reason not to feed live is to alleviate unnecessary suffering in the food animal. Usually feeder rodents are killed with a swift blow to the head that results in instant death. I feel that this is far more humane than letting the snake slowly suffocate the animal. Dead animals are also easier to coat with vitamins and calcium. In the event of any reptile illness it is also much easier to stick medication in the dead animal's mouth than into a live one's.
Baby Corn Snakes tame down VERY quickly. All it takes is some daily handling for about a week and they become very "friendly". An adult that hasn't been handled much will tame down also although maybe not so fast. Babies may nip at you at first but that should end quickly. It doesn't hurt much anyway.
When picking up a Corn Snake you want to be gentle but firm. A small snake or a baby can be picked up with one hand. A larger one needs to be supported with both hands. Don't just pick up an adult by either end while letting the other end dangle. If the snake feels unsupported it might thrash around and injure itself.
Let a baby Corn Snake slither through your fingers, back and forth between your hands. Just keep letting him crawl around. He may be fast at first but once he figures out that you don't want to hurt him or eat him he will calm down. Corn Snakes don't calm down as much as the Pythons or Boas. It is just their nature to be more active. Don't expect to be able to walk around the house with your adult Corn Snake wrapped around your neck. It is more likely that he will be crawling all over the place and attempting to wrap around anything you walk near.
Never walk around in public with your snake wrapped around your neck or wrapped around anything else for that matter. The snake probably doesn't enjoy it all that much. There are also a lot of people that are already afraid of them and don't need to be surprised by one roaming the streets. Snake-a-phobes already think we are crazy to keep these great creatures. We don't need to dangle them in their faces.