Picking a solid cage is a necessity for proper corn snake care. A 20 gallon long (i.e. longer, shallower version) makes a good sized cage for a corn snake. The most important part is to get a secure fitting lid that can be clamped down. Corn snakes will push at the lid with their noses looking for weaknesses so the fit of the lid is very important.
A variety of materials can be used for substrate. Newspaper is the utilitarian choice - it is very easy to clean up, but the appearance in the cage leaves a little to be desired. Indoor/outdoor carpeting ("Astroturf") can be used, and if you cut two pieces you can rotate them by swapping the clean one for the dirty one at cleaning time, and thoroughly washing and drying the soiled one. Pine bark chips are another good choice - the chips soiled with feces can simple be scooped out, and a thorough cleaning done as needed. Aspen shaving can be used in a similar manner, although it is probably a good idea to move the snake to a separate container for feeding so that the shavings are not inadvertently ingested. Sand, soil, corncob, pine shavings and cedar shavings are not good choices.
Hiding spots should be provided - a hide box (any closed in container like a cardboard box will do) should be provided that is just large enough for the snake to curl up in (if it is too large the snake will not feel as secure). Pieced of bark can also provide hiding spots if on a substrate that allows them to burrow under them. Ideally, a hiding place should be available in both the cooler and warmer ends of the enclosure. A branch should also be provided for climbing.
A water dish will also be necessary, and the water should be kept meticulously clean. Snakes often defecate in their water, in which case it should be immediately cleaned. A heavy dish several inches in diameter makes a good water source. You may find you snake soaking in the dish, particularly before a shed.
Maintaining the cage at the correct temperature is vital to care of any reptile. A temperature gradient of about 70-85 F (21-29 C) should be maintained in the cage. Under tank heat pads or heat tape can be used, but place only under half the tank so there is a gradient from cooler to warmer. An overhead incandescent light can also be used to provide the heat gradient or as a supplemental basking spot. Corn snakes are from a temperate climate so they do not need tropical temperatures!
There are no special light requirements for corn snakes.
Corn snakes should be fed pre-killed mice or small rats (small rats are only suitable for larger corn snakes). Hatchlings are started out on pinkie mice for feedings and the size of the prey is increased as the snake grows. The prey item can be as wide or a little wider than the snakes head. Young growing snakes should be fed a couple of times a week, while adults need only be fed one appropriately sized prey item every week or 10 days.
It is not unusual for the appetite to decline around the time of a shed, so feeding frequency can be reduced if the appetite diminishes.