Personally I discourage my students from taking their shoes off unless they are absolutely caked in mud (very rare) as I prefer a bit of mud on the carpet to the general smell of sweaty feet that have lived in trainers all day at school.
In fact I went to a cheap carpet shop and bought some strips of carpet which cover the hall carpet from front door to kitchen area which is tiled so washes fine if needs be. Then into the music room where further strips of carpet cover the main area where pupils stand/sit and under the piano pedals.
I personally find that the best solution for me but I respect totally others who ask for shoes to be removed. I once went to accompany a piano pupil who was taking her flute exam with another teacher at a private house. We all had to take our shoes off - even the examiner

- but I found using the pedals very uncomfortable in socked feet.
Each to their own I guess and what works for me might now suit others.