How-to-simply...

Get hostname from Url in C#

  • 1 (new Uri(url)).GetLeftPart(UriPartial.Authority)