Net-informations.com
SiteMap  | About    

Get domain name from URL

How to Get host domain from URL?

how to get domain name from UL

A URI (uniform resource identifier ) is a representation of a resource available to your application on the network. You can retrieve host of a url by using Request object or Uri.

Get domain name of a url

Using Request.Url

VB.Net

C#

Using Uri

C#

VB.Net

Or u can parse the url using regex

parse the url

How to parse a domain from URL?

C#

How to get domain part from URL

VB.Net

Extract domain name from URL

A better way you could go without the need for regular expression or parsing is to use the below code.

VB.Net

C#









net-informations.com (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.