Spiders are among the earliest animals to live on land, and may have evolved around 400 million years ago.
Spiders likely evolved from ancestors of sclerenchyma arachnids around 400 million years ago, who had only recently begun living in water. The first definitive spider was a slender-waisted arachnid with abdominal segments and the ability to spin silk, identified in fossils such as *Attercopus fimbriungus*. This spider lived during the Devonian period, 380 million years ago, 150 million years before dinosaurs.

Most early segmented spider fossils belong to the mesodermatidae, a group of primitive spiders whose spinnerets were located on the lower middle part of their abdomen (rather than at the end of the abdomen as in "modern" spiders). They were likely terrestrial predators living in the vast forests of lycophytes and ferns of the Middle to Late Paleozoic, where they may have been predators of other primitive arthropods such as cockroaches, giant bark beetles, plate-shelled turtles, and millipedes. Silk may have served simply as a protective layer for eggs, a lining for evacuation holes, and later possibly for simple ground webs and trapdoor structures.
As the lives of plants and insects diversified, so did the spiders' use of silk. Spiders with spinnerets at the end of their abdomens (Mesarapoda) appeared more than 250 million years ago, which may have spurred the development of more complex sheet-like and labyrinthine webs for capturing prey on the ground and leaves, as well as the development of secure shovels.

By the Jurassic period (191-136 million years ago), as dinosaurs roamed the earth, the complex aerial webs of the spherical spider had developed, enabling it to capture rapidly diverse swarms of flying insects. Similarly, the diversification of hunting spiders in niches such as garbage, bark, and leaves progressed with new prey captures and habitat opportunities.
Nevertheless, the fossil record of spiders is relatively poor. The abundant record of amber-encased spider fossils from the Tertiary period (complete spiders trapped in transparent, viscous resin) suggests that a spider fauna fundamentally similar to those of today existed 30 million years ago.

Living fossil
Surprisingly, the segmented spider has survived in East Asia (from China to Indonesia) from the Late Paleozoic Era. These large and impressive spiders live in forested areas and in soil burrows with trapdoors. The segmented spider is very similar to its ancestors and has hardly changed. They have not been found in Australia.
The largest "spider" in history?
A 300-million-year-old, half-meter-long arachnid fossil, *Megarachne servinei*, was initially described as a spider but is now considered more likely to represent another spider-like ancient arachnid. Its distinctive features include its enormous size, a massive shovel-like mandible, and a shield-like covering with ribs on its abdomen. A spider of this size would certainly have preyed on large prey such as cockroaches and giant millipedes. But why would such a massive predator need such an impressively armored body—were there even larger spider predators around?