Enclosure Size
The general rule of thumb when snake keeping is that the length of the enclosure is at least 2/3 the length of your snake. An adult corn snake, depending on its sex, typically ranges from 24 - 60 inches. A 40-gallon enclosure (36x18x16) is recommended, however, a 60-gallon enclosure (48x16x20) is recommended for larger snakes. If you have a juvenile (hatchling or yearling) corn snake, it is best to keep them in a 10-gallon enclosure (20x10x12). Smaller enclosures for juvenile snakes help them feel more secure and find resources such as their water and food more easily.
Temperature & Humidity
The hot side of a corn snake's enclosure should maintain around 85° F to ensure a proper basking spot and natural temperature gradient. On the other side of the enclosure, the temperature should naturally drop down to around 75° F. In addition, a proper-sized water bowl should easily maintain their needed humidity at around 30% - 50%.
Substrate
Most corn snake owners keep their snake on a thick layer of aspen (around 3 inches) for many reasons. Aspen is one of the most used substrates for non-tropical species of snakes because it encourages burrowing behavior, holds its shape for den building, is not harmful to the snake's respiratory system, and can be easily spot-cleaned when needed.
If you are looking for a more natural-looking setup for your snake, another option for western hognoses is combining a mixture of 60% soil and 40% play sand. This mixture will also encourage natural burrowing behaviors, holds its shape for den building, and is not harmful to the snake's respiratory system. However, it is important to make sure the mixture does not get too damp to prevent scale rot.
Diet
In the wild, a corn snake eats a combination of different rodents, small mammals, and sometimes birds. Captive bred corn snakes take easily to mice and almost always have no issues eating.
Snakes should either be tong fed, their meal be placed on top of a hide or placed on top of a plastic lid to prevent them from ingesting their substrate. Ingesting substrate may cause the animal impaction in their digestive tract.