How to name a "domain name" without TLD? - url

Is there a specific name for this kind of "domain name" : https://www.website ?
It's neither a domain name, a hostname, or an URL (because there's no TLD), neither a Second-level domain (because there's https://www.)

There is no specific name because there is nothing specific in your case.
https://www.website is an URL like any other ones, for hostname www.website which is on the TLD website, which is a gTLD, see https://www.iana.org/domains/root/db/website.html
There is nothing special here. You are probably not aware that website is a new TLD.

Related

How to properly set netsh http add urlacl?

I want to reserve a port for IISExpress 10 to serve a simple website to my LAN, but how do I properly use this?
add urlacl [url=]string
[[user=]string
{[[listen={yes|no}] [delegate={yes|no}]] | [sddl=]string}```
(I cut some of this ↓)
[url=] string
Specifies the fully qualified URL.
[listen={yes|no}]
Specifies one of the following values:
yes: Allows the user to register URLs. This is the default value.
no: Denies the user from registering URLs.
[delegate={yes|no}]
Specifies one of the following values:
yes: Allows the user to delegate URLs.
no: Denies the user from delegating URLs. This is the default value.
[sddl=] string
Specifies the SDDL string that describes the DACL.
So what do the url,listen,delegate, and sddl params do, and how do I use them?
Good examples are on Microsoft's site:
https://learn.microsoft.com/en-us/windows/win32/http/add-urlacl
You might get "Parameter is incorrect" which caused me some consternation.
Note that url must be a proper uri, http://+:8000 is not because its missing trailing slash, but http://+:8000/ is valid because of the trailing slash). Also http://+:8000/MyUri is valid

Use of dot ( . ) after www. in the URL

I often visit a link!
But i have no idea what dot (.) represents in the URL.
What is use of dot (.) in the URL?
The dot (.) is the character that was defined to be the delimiter in domain names (see DNS).
It delimits the labels in a domain name.
The domain name www.google.com consists of three labels:
com (aka. the top-level domain)
google (aka. the second-level domain)
www (aka. the third-level domain, or subdomain)
The '.' is like a character which differentiates from the domains. like www.todaysfuture.in the '.' after www means the first domain is done. then it checks the next domain.
The best example is like your email ID
first is the email-ID
then is the '#' that means the account name is done
then comes gmail/yahoo/wtvr
then a '.' to finish the account type
then '.' com or in depending on the account
Web addresses, or Uniform Resource Locators, go backwards with more specific terms coming first (like real addresses).
So for www.google.com
com is the top level domain - it might be a global domain like .com or a country code like .uk, and some top level domains have sub divisions like .gov.uk and .co.uk.
google is the domain - this is the name you actually buy and route to your servers/services
www subdomain - these are optional, and can be used to distinguish different services running on the same server, so www.google.com would serve web pages while ftp.google.com might be an FTP service.
Note that the subdomain is often optional - google.com and most other servers will assume www as the default service or infer it from the protocol (the http:// bit).

Are there URI schemas for identifying IP addresses and domain names?

Is there a Unique Resource Identifier (URI) schema which allows to uniquely refer to IP addresses and domain names?
For example "http://8o.232.240.50" or "http://supersite.com" are not refering to IP address or a domain name, rather they are refering to some resource which can be accessed via HTTP protocol and it's HTTP path happens to include this given IP address or domain name. Therefore they are more of Unique Resource Locators (URL) than Unique Resource Identifiers (URI) or Unique Resource Names (URN).
What I am looking for are schemas like "mailto:someemai#something.com" for IP addresses and/or domain names.
Something like "domain:supersite.com" and "ip:80.232.240.50".
I could make up schemes like these for my own use, but I am wondering if there isn't something like this already out there. And if there isn't, why?
RFC 4501: Domain Name System Uniform Resource Identifiers
The Domain Name System (DNS) […] is a widely deployed system
used, among other things, to translate host names into IP addresses.
Several protocols use Uniform Resource Identifiers (URIs) to refer to
data. By defining a URI scheme for DNS data, the gap between these
two worlds is bridged. The DNS URI scheme defined here can be used
to reference any data stored in the DNS.
From the examples:
dns:www.example.org.?clAsS=IN;tYpE=A
dns:www.example.org
dns:simon.example.org?type=CERT
dns://192.168.1.1/ftp.example.org?type=A
dns:world%20wide%20web.example%5c.domain.org?TYPE=TXT
dns://fw.example.org/*.%20%00.example?type=TXT
According to the syntax, it should be possible to use the dnsauthority with an empty dnsname. dnsauthority takes a host as defined in RFC 3986, which says:
host = IP-literal / IPv4address / reg-name
So it should be possible to use domain names as well as IP addresses (an empty dnsname "is to be interpreted as the root itself").

Validate domain name and ip address using regex in Rails

I have tried build app like whois domain tool site.
On form have one text_field and I want field only input with domain name and ip address.
Example domain name : domain.com (without http://www. or https://www. or subdomain.)
Example Ip address : 4.4.4.4
I want validate using regex, I have create this regex (demo on rubular)
([a-zA-Z0-9]+(\.[a-zA-Z0-9]+)+.*)
But that is not clean, www. or subdomain still accepted.
Check out this built in Ruby class Resolv::IPv4::Regex for IP validation
and this URI for domain names.
IP Adress:
/^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}(?:\-([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))?$/

How to assign a urn(uniform resource name) to a url

How to assign a URI/URN to a corresponding URL. What are the steps to do it.
Say i have a URL https://staging.test.com how to assign a URN to it to make it something like
urn:testing:test:stage
Thank you.
How to assign a URI/URN to a corresponding URL.
Just to clarify: an URL is an URI already. See: What is the difference between a URI, a URL and a URN?
Say i have a URL https://staging.test.com how to assign a URN to it to make it something like urn:testing:test:stage
You can find a list of registered URN namespaces at http://www.iana.org/assignments/urn-namespaces/urn-namespaces.xml. If your ressource isn't "part" of any of these entities, you must not use their namespace. Example: If your ressoure isn't a book with an ISBN number, you must not use the isbn namespace. You would have to formally register your own URN namespace.
However: You could use any namespace starting with X-.
See RFC 3406: 3.1: Experimental Namespaces:
These are not explicitly registered with IANA. They take the form:
X-<NID>
No provision is made for avoiding collision of experimental NIDs; they are intended for use within internal or limited experimental contexts.

Resources