Using C# how would one determine if a URL is an intranet URL? I would like some code to do something if a URL is an intranet one vs public.
You can look in File -> Properties. Press Alt to display the menu bar if it's not there. There you can see "Local intranet" or "Internet".
Intranet Domain means a domain name, host name or IP address assigned to a Device, not accessible from the Internet (not publicly facing), and owned by the Subscriber used in a Symantec Trust Network Class 3 organizational SSL Certificate.
For an employee to have access to the Intranet, they must have a special network password and be connected to the LAN. If you have remote employees, they can connect remotely to the Intranet via a virtual private network (VPN).
you cannot implicitely know. if your intranet urls look like fully qualified domain names then it's difficult to tell. the only way to tell is to query two different DNS-servers (your own and a public one). If both return the same result, then it's an internet domain. if the public DNS-server isn't able to resolve the address, then it's most likely an intranet domain.
Do you know the internal subnets (in terms of IP addresses)? If so, I'd just resolve the host name and see if it's internal that way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With