Modi was accompanied by Uttarakhand Chief Minister Trivendra Singh Rawat and other state and central government officials.
The priests at the Lord Shiva shrine and the locals welcomed the Prime Minister. The temple was decked up with yellow flowers.
The Prime Minister sat in the sanctum sanctorum, offered prayers and performed the Rudrabhishek, a day after Diwali.
He will be laying the foundation stone for a new ‘Kedarpuri’, which was ravaged in flash floods in 2013, killing thousands.
The area surrounding the temple was destroyed in June 2013 after the Chorabari Glacier lake breached following heavy rainfall that caused flash floods in the river Mandakini.
Modi will also lay foundation stones for reconstruction of the ‘samadhi sthal’ of Adi Shankracharya and construction of a museum. He is also likely to address a gathering at the shrine.
Modi had visited the shrine on May 3.