Snakes (Serpentes) live almost everywhere on Earth, except the polar regions, which are too cold for these cold-blooded animals. Snakes live in deserts and forests, regardless of whether these environments are tropical or temperate. They are found in freshwater and brackish swamps and marshes. Some snakes are even completely aquatic. They live on farms and pastures, in dry shrublands, mountains, rocky areas, and even in houses and irrigation ditches. Continue reading to discover more about snakes and their habitats.
1. Rainforest

A paradise flying snake (Chrysopelea paradisi) on a leaf. These snakes commonly live in the rainforest.
©Vince Adam/Shutterstock.com
Tropical rainforests are biomes where it rains 60 to 200 inches every year. These tropical rainforests are an ideal habitat for snakes. The temperature and humidity levels are perfect, prey is abundant, and there is plenty of vegetation to hide within. This is why so many types of snakes are found in tropical rainforests.
One snake that inhabits the rainforest is the common boa constrictor (Boa constrictor), found in South and Central America. These snakes can grow between 6 and 13.5 feet long. Depending on where it is found, it can be gray, dark brown, or light brown, with saddle markings. Some have red tails, especially young boas. The boa subdues its prey by constricting it within its coils until it dies. Though it is not venomous, it can still bite. The common boa is a live-bearer and has 15 to 50 babies at a time. It is also an adept swimmer and will climb trees in search of prey.
2. Desert

A venomous sidewinder rattlesnake with a forked tongue lies on the desert sand.
©Mark_Kostich/Shutterstock.com
Deserts are biomes with scarce precipitation and vegetation. Deserts can be hot or cold. For example, Antarctica is considered a desert. Although there are no snakes in Antarctica, many types of snakes live in hot deserts.
The sidewinder (Crotalus cerastes) is a species of rattlesnake that’s found in the southwestern United States and northwestern Mexico. It is a small snake that grows up to 31 inches long. The sidewinder is paler than other rattlesnakes, allowing it to blend into the desert. It is found in shades of gray, cream, tan, yellow, or even pink with spots. It also differs from other rattlesnakes in that it has horns above its eyes. These horns keep sand out of the snake’s eyes as it burrows. It gets its name from its unique sideways movement over the sand. Scientists believe this sidewinding gives the snake better traction. You can tell that a sidewinder has been in the area by its distinctive J-shaped tracks.
Other snakes that live in the desert include the mole snake (Pseudaspis cana), the long-nosed snake (Rhinocheilus lecontei), and the western coral snake (Micruroides euryxanthus).
3. Wetlands

A water moccasin (Agkistrodon piscivorus) floating on water. Water moccasins are very common in wetlands.
©Seth LaGrange/Shutterstock.com
Snakes also live in wetlands. One type of wetland is a swamp, where the soil is highly saturated or covered with standing water. Swamps are home to water-loving trees, bushes, and shrubs. Another type of wetland is the marsh. A marsh is created by flooding from nearby lakes, rivers, or streams. Unlike a swamp, the plants in a marsh are herbaceous, meaning they usually have soft stems. Like swamps, marshes can hold salt, fresh, or brackish water.
One snake that lives in wetlands is the cottonmouth, also known as the water moccasin (Agkistrodon piscivorus). This snake is from the southeastern United States and gets its name because the inside of its mouth is white. Although it’s not a large snake and usually doesn’t grow longer than three feet, it is dangerous. Its venom is highly toxic and can cause serious injury, but fatalities from cottonmouth bites are extremely rare due to effective medical treatment. Besides ponds and marshes, cottonmouths can be found in rice paddies, rivers, lakes, and streams. They are even found in drainage ditches. Cottonmouths have no problem swimming in saltwater, though they prefer freshwater. The cottonmouth eats anything it can catch, but usually sticks with frogs and fish. It is also one of the few snakes that scavenge and will even eat other snakes, including its own kind.
4. Saltwater and Freshwater

A banded sea krait (Laticauda colubrina) swimming over a coral reef.
©Rich Carey/Shutterstock.com
Sea snakes are aquatic snakes that spend all their lives in saltwater. Sea snakes have adaptations for saltwater habitats, such as tail-like paddles and compressed bodies that resemble colorful, patterned eels. However, unlike eels, they lack gills. Like whales, sea snakes need to come to the surface for air. They can also expel excess salt from their body. They eat fish and baby octopuses.
Sea snakes are not the only snakes that live in aquatic environments. The Javan file snake (Acrochordus javanicus), found in Oceania and Southern Asia, is also aquatic; however, it is a freshwater snake.
5. Mountains

A juvenile Himalayan pit viper in Uttaranchal, India.
©iStock.com/ePhotocorp
The Himalayan pit viper (Gloydius himalayanus) is found on the southern slopes of the Himalayan mountains at altitudes between 6,900 and 16,200 feet. It has had to adapt to the cold, dry air that comes with living at such elevations. It shelters under rocks or fallen leaves and eats small rodents and invertebrates.
The Himalayan pit viper is a small snake that grows to 3 feet in length and has a notably wide and long head with large scales. It’s brown or mottled on top and white with red and black dots on its belly. It dwells in the mountains of India, Nepal, and Pakistan and is one of the pit viper species found in Pakistan.
6. Forest and Woodlands

A black rat snake in Virginia’s Caledon State Park. The rat snake is a constrictor, commonly found in the United States.
©Realest Nature/Shutterstock.com
Woodlands are biomes that have trees, but not so many that sunlight is completely blocked. Because there is a lot of sun, woodlands often support grasses and herbaceous plants that are found near trees. Snakes are fond of this habitat, as it provides cover and prey. One snake found in woodlands is the rat snake (Pantherophis obsoletus). This common snake is found in the United States. It can grow up to 6 feet long, but some individuals have been found that are over 8 feet in length. Beautifully suited to its habitat, it can easily climb trees and swim. During the winter it dens with rattlers and copperheads.
The rat snake is a constrictor, and despite its name, it does not specifically eat rats. It will readily eat other snakes, lizards, amphibians, baby rabbits, opossums, birds, and their eggs. The rat snake mates in late spring and lays its eggs in early summer.
Forests are also full of trees; however, these areas are shadier with little sunlight. Snakes that live in the forest include the South American coral snake (Micrurus lemniscatus), the king cobra (Ophiophagus hannah), and the golden lancehead (Bothrops insularis).
7. Grasslands

A green anaconda (Eunectes murinus), which is especially partial to flooded grassland.
©Patrick K. Campbell/Shutterstock.com
Grasslands, like snakes, are found just about everywhere on Earth except the polar regions. One snake found in grasslands is the anaconda (Eunectes), which is large enough to potentially eat a human, though there are no confirmed cases of anacondas eating humans. This huge snake, however, does eat capybaras, deer, juvenile jaguars, and even caimans. It also likes lagoons and rivers found in the rainforest, but it is especially partial to flooded grassland. There, this 17-foot-long, 150-pound snake can lie in wait in the grass until prey comes close enough to be ambushed. Because it spends time in the water, its eyes are positioned closer to the top of its head than those of terrestrial snakes.
8. In and Around Human Habitation

A black rat snake looks through the sliding glass door on the back porch of a house in North Carolina in spring.
©Kyla Metzker/Shutterstock.com
Snakes also dwell in houses and outbuildings such as barns. The common house snake is one example. Native to Sub-Saharan Africa, this harmless snake is 3 to 5 feet long and comes in iridescent colors of bronze, brown, black, or red.
Snakes that show up in houses in the United States include garter snakes (Thamnophis spp.), ring-necked snakes (Diadophis punctatus), rat snakes (Pantherophis obsoletus), and kingsnakes (Lampropeltis). Snakes that inhabit farms, pastures, and gardens globally include the northern death adder (Acanthophis praelongus), several species of cobra (Naja spp.), including the Indian spectacled (Naja naja), the mamushi (Gloydius blomhoffii), the corn snake (Pantherophis guttatus), and the coachwhip (Masticophis flagellum).