You have probably seen the photo even if you have never been to Japan. A path climbs a wooded hill, and over it stand orange-red gates, one after another, so close together that they form a tunnel. That is Fushimi Inari Shrine in Kyoto. Or the other one: a single huge red gate standing in the sea, water around its legs at high tide, at Itsukushima Shrine on the island of Miyajima.

These gates are called torii, and once you start looking, they are everywhere in Japan, from mountain shrines to a tiny shrine squeezed between two office buildings. Japanese maps even use a simple torii shape as the symbol for a shrine.

But look closely and something is odd. A torii has no door. It is not attached to a wall or a fence. You could walk around it as easily as through it. So what is it actually doing there, and why is it so often red?

A gate that marks a line, not a barrier

The short answer: a torii marks the boundary between the everyday world where people live and the place that belongs to a god. Walk through it and you are entering sacred ground.

That is why it needs no door. It is not there to keep anyone out. It is there to tell you where you are. Manabu Toya, a Japanese writer on shrines, sums up its meaning in a few words: “from here on, sacred ground.”

Many shrines in Japan began as places where people sensed a god was present: a great tree, a rock, a mountain. Shinto, Japan’s native religion, has a great many gods, and a god is often felt to be present in the tree, the rock or the mountain itself, not only inside a shrine building. A torii is a way of drawing a line around that place. Everything beyond it belongs to the god.

So when you pass under one, the ground you are walking on has changed, even though it looks the same. Beyond the gate usually comes the approach path to the shrine, and often a stone basin where visitors rinse their hands and mouth before they pray. That is the first thing people do once they have crossed the line.

The great gate at Itsukushima takes this idea out into the water. Like every torii, it closes nothing off. It simply stands in the sea and marks the line, and it is not even buried in the seabed: the whole gate, about 60 tons, stays upright by its own weight.

Where the torii came from is still an open question. Even the name has several explanations. One reads it as a perch, “where birds stay,” because tori means bird. Another links it to the Japanese words for “pass through and go in,” which fits what a gate does. People have looked for its roots in similar gateways in India and China, but nobody has settled where it began.

Why so many are red

The red of a torii is a bright vermilion, somewhere between red and orange.

The first reason usually given is that this color has long been thought to ward off evil. A gate between the ordinary world and a sacred one is a good place to put a color that keeps bad things out.

The second is practical. The traditional vermilion pigment was made with mercury, and it helped protect the wood from rot and insects. A gate standing in rain and sun, or in the sea, needs that.

Here is the surprise, though: most torii were never meant to be red. The ones painted vermilion all over belong mainly to two families of shrines, the Inari shrines (Fushimi Inari is the head one) and the Hachiman shrines. In principle, a torii is plain, unpainted wood. Ise Shrine, the most important shrine in Japan, uses plain wood. Many others are bare stone or even metal.

There is no rule that says a torii must be any color. But the red ones are the ones in the famous photos, so they are the ones most people picture. Fushimi Inari is an Inari shrine, so its gates are vermilion. The tunnel is so long because people keep adding to it. In Japanese, a wish that comes true can be said to have “passed through,” and the verb for passing through, tōru, sounds a lot like torii. So there is a custom of giving a torii to the shrine as thanks for a wish that went through. Each gate in that tunnel is a thank-you from someone.

How people walk through

There is no ticket and no guard, but many people in Japan slow down at the torii. A common habit is to stop for a moment and give a small bow before passing under it, as if saying hello at someone’s front door.

Many also avoid walking right down the middle of the path. At many shrines the center of the path is thought of as the road the god uses, so people step a little to the left or right to leave it clear. This is a custom and a courtesy, not a law. Plenty of people walk straight through without thinking about it, and nobody will stop a visitor who does.

You can use the torii to tell a shrine from a Buddhist temple, too. Temples usually have a gatehouse with a roof, often with doors. The open, doorless torii is the mark of a shrine.

Back to the red tunnel

So, the gates in that famous photo are not doors to anything. Each one is a line in the air that says: past here, this place belongs to a god. Many are plain wood or stone; the red ones are red because that color was thought to keep evil away and keep wood sound, and because some shrines made it theirs.