It is a mitzvah to place it below ten tefachim close to the ground, for in this there is a recognition that it is for a mitzvah. For a mundane lamp used for service—one does not place it so low (the Rosh). Nevertheless, one should not place it lower than three close to the ground, for in such a case there is no recognition of the mitzvah at all. Nevertheless, if he placed it above ten—he has fulfilled the obligation, provided that it is below twenty amot. For if he placed it above twenty amot—it is invalid, for above twenty the eye does not rule. And even if he lowered it down—it is invalid, for we require lighting in a valid location. And he must extinguish it, place it below twenty, and light it. And some say that nowadays when we light inside the house—it is valid even above twenty, for since the house has a roof and walls—the eye rules even above twenty, just as in a sukkah where the walls reach the sechach. And the Tur disagrees regarding this, for specifically in a sukkah the eye rules over the entire sechach. But here regarding the lamps, which are below the roof—it makes no difference. And so it appears from the opinion of most of the poskim, who did not make such a distinction. And when one lights in a window, it appears that there is no distinction, and he may place it in any location he desires, whether below three from the floor of the window, or above ten tefachim, for in a window there is recognition in every location (and so it is implied in the Magen Avraham, subsection 6). And when one lights in a doorway, and there is a threshold there—it appears to me that we calculate from the threshold, and not from the ground. And he should place it ab initio within ten tefachim close to the threshold, and higher than three tefachim from the threshold. And it is obvious that if the candlestick is tall—that we calculate from the location of the lamps, and not from the top of the candlestick. And the Rambam did not mention at all this matter of being within ten tefachim, because in the Gemara there is a rejection of this. But most of the poskim ruled like the Tur and the Shulchan Aruch, because that is a mere rejection, but for the halacha we maintain so. And so is the primary ruling, and so we practice.
מצוה להניחה למטה מעשרה טפחים סמוך לקרקע, דבזה יש היכר שהוא למצוה. דנר של חול שלתשמיש – אין מניחין כל כך נמוך (רא"ש). ומכל מקום לא יניחה בפחות משלושה סמוך לקרקע, דבכי האי גוונא אין היכר למצוה כלל. ומכל מקום אם הניחה למעלה מעשרה – יצא, ובלבד שתהא למטה מעשרים אמה. דאם הניחה למעלה מעשרים אמה – פסולה, דלמעלה מעשרים לא שלטא עינא. ואפילו הורידה למטה – פסולה, דבעינן הדלקה במקום הכשר. וצריך לכבותה, ולהניחה למטה מעשרים, ולהדליקה. ויש אומרים דהאידנא שמדליקין בבית – כשר אפילו למעלה מעשרים, דכיון דהבית יש לה קירוי ודפנות – העין שולטת אף למעלה מעשרים, כמו בסוכה בדפנות מגיעות לסכך. והטור חולק בזה, דדווקא בסוכה שהעין שולטת על כל הסכך. אבל הכא בהנרות, שהם למטה מן הגג – אין נפקא מינה. וכן נראה מדעת רוב הפוסקים, שלא חילקו בכך. וכשמדליק בחלון נראה דאין חילוק, ויכול להניחו בכל מקום שירצה, בין למטה משלושה לקרקעית החלון, ובין למעלה מעשרה טפחים, דבחלון יש היכר בכל מקום (וכן משמע במגן אברהם סעיף קטן ו). וכשמדליק בפתח, ויש שם אסקופה – נראה לי דחשבינן מן האסקופה, ולא מן הקרקע. ויניח לכתחילה בתוך עשרה טפחים סמוך להאסקופה, ולמעלה משלושה טפחים מהאסקופה. ופשוט הוא דאם הפמוט גבוה – דחשבינן ממקום הנרות, ולא מראש הפמוט. והרמב"ם לא הזכיר כלל הך דבתוך עשרה טפחים, משום דבגמרא יש דיחוי על זה. אבל רוב הפוסקים פסקו כהטור והשולחן ערוך, משום דזהו דיחוי בעלמא, אבל להלכה קיימא לן כן. וכן עיקר לדינא, וכן אנו נוהגים.