Get the root part of a domain in .NET
Β·1 min read
βββ
Need to get the .com, .us, .biz, etc. part of the domain name in .NET? Here's how:
Dim root As String
root = Right(Request.Url.Host, (Request.Url.Host.Length) - InStrRev(Request.Url.Host, "."))