Workaround: string match = "www.telerik.com"; string text = File.ReadAllText("..\\..\\test.html"); text = text.Replace(match, "http://" + match); File.WriteAllText("..\\..\\test.html", text);