temples and pilgrimage
Is it true that non-Hindus are not allowed to enter certain Hindu temples, and why?
The reason some temples restrict entry
Certain temples follow a body of rules called the Agamas, which govern how a temple is built, consecrated, and maintained. Within this framework, some priests and temple authorities hold that the ritual purity of the inner sanctum depends on who enters it. A few temples extend this to require that visitors be Hindu. The idea is not about outsiders being unwelcome as people, but about preserving a specific ritual state inside the temple. This is the argument made at temples like Puri Jagannath in Odisha and Padmanabhaswamy in Kerala, both of which are well known for restricting entry to non-Hindus.
Where it gets complicated
These restrictions have been challenged in courts and debated publicly in India for a long time. There is no single law or religious text that all Hindus agree settles the question. Different temple trusts, different states, and different traditions have reached different conclusions. Some temples that once had restrictions have opened their doors over time. Others have kept them. The debate is ongoing and the answers vary by place.
Temples that welcome everyone
Many famous Hindu temples have no such restriction at all. Tirupati in Andhra Pradesh, one of the most visited temples in the world, asks non-Hindu visitors to sign a declaration of faith before entering but does not turn people away. Many smaller temples across India and around the world place no restrictions on visitors of any background. Temples outside India, serving diaspora communities, are almost always open to anyone who comes respectfully. So the picture is very mixed.
Today
For anyone planning to visit a temple, the practical answer is that rules differ from temple to temple. Some will ask about faith at the entrance. Some will restrict access to the innermost shrine but allow visitors into the outer courtyard. Many will simply welcome you in. It is worth checking the specific temple beforehand. The tradition as a whole does not speak with one voice on this question, and that is worth knowing.