Temple Etiquestte
All people who visit Buddhist and Hindu temples should be dressed correctly. This entails removing your shoes and headgear as well as covering your shoulders and legs in Buddhist temples. Beachwear is offensive and not appropriate. If you're unsure about when to remove your shoes and hat in a large temple, just go with the flow and do as the locals do. Finally, keep in mind that when the tropical sun has heated the stone underfoot to oven-like temperatures, walking around temples barefoot can occasionally be more difficult than you might anticipate. However, no one will care if you wear socks.
There are two other traditional Buddhist observances that are only loosely observed in Sri Lanka: the prohibition against pointing your feet at a Buddha image is not as widely observed as it might be in, say, Thailand, though you occasionally see people sitting in front of Buddhas with their legs neatly tucked under them. However, you should never have yourself photographed posing with a Buddha image (that is, with your back to the image). The conventional Buddhist rule that you must only circle dagobas in a clockwise orientation is also not strictly adhered to.
Hindu temples follow the same footwear and attire guidelines, with a few exceptions. Non-Hindus are not allowed in some inner shrines; in others, men must remove their shirts before entering; and sometimes, ladies are completely forbidden.
You may be given a tour of various temples (Buddhist and Hindu) by a resident monk or priest in exchange for a donation. In certain other locations, unauthorized "guides" will occasionally come up and insist on showing you around in exchange for payment. Try not to feel compelled to use unofficial guides unless you genuinely want their services.