In the "Jiyun" (集韵) and "Zhengyun" (正韵), it is recorded that the pronunciation is "shi li qie" (时吏切), sounding the same as "shi" (侍). "Si ren" (寺人) refers to eunuchs. Some character forms have the "men" (门) radical.
Also, the "Jiyun" (集韵) records the pronunciation as "xiang li qie" (祥吏切), sounding the same as "si" (饲). The "Shuowen Jiezi" (说文解字) explains: "Ting" (廷) refers to the imperial court; it is a place with laws and regulations. The original character was written as "si" (寺). The "Wuyin Jiyun" (五音集韵) states: "Si" (寺) is equivalent to "si" (司); it is where officials work and stay, with nine government offices. "Shiming" (释名) says: "Si" (寺) means "si" (嗣), those who govern affairs continue in succession within it.
Furthermore, in the Han Dynasty, when Buddhist scriptures arrived from the Western Regions carried by white horses, they were initially housed at the Honglu Temple (鸿胪寺). Thus, the name "si" (寺) was adopted, and the White Horse Temple (白马寺) was established.