Railway rails are welded in situ by induction welding with an insert (3) between the ends of the rails (1) being welded. The insert (3) compensates, at least in part, for the loss of rail length that occurs in the welding process. Preferably the ends of the rails are pushed apart (e.g. by the length of rail consumed in the welding process) before the insert (3) is placed in position, thereby allowing a longer insert to be used. Induction heating may be performed with a split head (5) that can be opened so as to be placed around a rail in situ and then closed to carry out induction heating.