The cockroaches are an ancient group, dating back at least as far as the Carboniferous period, some 320 million years ago. Those early ancestors however lacked the internal ovipositors of modern roaches. Cockroaches are somewhat generalized insects without special adaptations like the sucking mouthparts of aphids and other true bugs; they have chewing mouthparts and are likely among the most primitive of living Neopteran insects.
They are common and hardy insects, and can tolerate a wide range of environments from Arctic cold to tropical heat. Tropical cockroaches are often much bigger than temperate species, and, contrary to popular belief, extinct cockroach relatives (Blattoptera) and ‘roachoids’ such as the Carboniferous Archimylacris and the Permian Apthoroblattina were not as large as the biggest modern species.
Some species, such as the gregarious German cockroach, have an elaborate social structure involving common shelter, social dependence, information transfer and kin recognition. Cockroaches have appeared in human culture since classical antiquity. They are popularly depicted as dirty pests, though the great majority of species are inoffensive and live in a wide range of habitats around the world.
Since the 19th century, scientists believed that cockroaches were an ancient group of insects that had a Devonian origin, according to one hypothesis. Fossil roachoids that lived during that time differ from modern cockroaches in that they had long external ovipositors and are the ancestors of mantises, as well as modern cockroaches. As the body, hind wings and mouthparts are not preserved in fossils frequently, the relationship of these roachoids and modern cockroaches remains disputed. The first fossils of modern cockroaches with internal ovipositors appeared in the early Cretaceous. A recent phylogenetic analysis suggests that cockroaches originated at least in the Jurassic.