471. When to Recite Tefillas HaDerech

68:2 Tefillas HaDerech should only be recited when one has to travel at least a parsang (four mil, which is about 2.5 miles). (One’s method of transportation is irrelevant; also, if one is in a place of danger, he recites Tefillas HaDerech regardless of the distance – Mishnah Brurah 110:30.) Optimally, one should recite it within the first parsang of his journey. However, if one forgot to do so, he may recite Tefillas HaDerech as long as he is on the trip so long as he has not yet arrived within a parsang of the city wherein he intends to stay overnight.

68:3 Tefillas HaDerech should be recited immediately after some other bracha. Therefore, if one is departing early in the morning and he says the morning blessings on the way - or if he stayed overnight in a city so that he can recite Tefillas HaDerech before departing, which he does before the morning blessings - then he should say Tefillas HaDerech after the blessing "HaGomeil chasadim tovim l'amo Yisroel," that G-d performs purely beneficial deeds for His people, Israel. If the traveler departed from his home after davening Shacharis, he should eat or drink something on the way, recite the concluding bracha, and recite Tefillas HaDerech immediately afterward. One may likewise recite Tefillas HaDerech after the bracha of Asher Yatzar. (If one is not able to juxtapose Tefillas HaDerech with another bracha, he should recite it anyway, as not all authorities require such juxtaposition – Mishnah Brurah 110:28.)