The president accompanied by his wife Savita and other members of his family had arrived here yesterday to pay obeisance at three different shrines.
This was his first visit to the shrine after being sworn in as the 14th president in July.
He was in the temple for half an hour, temple sources said.
Andhra Pradesh Chief Minister N Chandrababu Naidu and Governor E S L Narasimhan accompanied the president.
On arrival at the main entrance of the temple complex, the president was accorded a ceremonial tradition reception, amid chanting of vedic hymns by high priests who escorted him to the sanctum sanctorum of the over 2000-year-old shrine.
A short while before visiting the ancient temple this morning, the president paid obeisance at the Varaha Swamy temple.
He had also visited the temple of Goddess Padmavathi at Tiruchanur near here yesterday before arriving at the hills.