Testing Domain Name

As a software tester of web applications, we may be required to know what is a valid domain name and what is an invalid domain name. A valid domain name must satisfy a number of requirements.

Then, what is a valid domain name?
A domain name is an identification of a unique computer system on the Internet. A complete domain name consists of one or more sub-domain names and one top-level domain name separated by dot or period symbols.

Top-level domains The top-level domain is divided into two groups. i) Generic top-level domains (gTLD)

ii) Country code top-level domains (ccTLD)

There are various examples for Generic top-level domains (gTLD), that you must have been aware of like; .COM, .NET, .GOV, .EDU, .ORG, etc. Similarly, there are various Country code top-level domains (ccTLD) like; .in, .pk, .us, etc.

Examples: www.mindfiresolutions.com Here, the top-level domain is .com www.songs.pk

Here, the top-level domain is .pk

Sub domains
As I have said, a complete domain name must consists of one or more sub domain names and one top-level domain name. The Sub domain or second-level domain generally resides just left of any top-level domain.

Example: www.mindfiresolutions.com

Here, the Sub domain (second-level domain) is .mindfiresolutions

Similarily, there can be multiple Sub domains inside a top-level domain.
For example, www.testisbestalways.blogspot.com is a complete domain name.

Here, as you know .com is a top-level domain name whereas .testisbestalways is said to be a sub-domain of .blogspot.com

and .blogspot is said to be a sub-domain of .com

A complete domain name is valid if it meets the following criteria:

A complete domain name must have one or more sub domain names and one top-level domain name. A complete domain name must use dots (.) or period (-) symbol to separate domain names. Domain names must use only alphanumeric characters and dashes (-). Domain names must not begin or end with dashes (-). Domain names must not have more than 63 characters.

The top-level domain name must be one of the predefined top-level domain names, like (com), (org), (in), etc.

150 150 Burnignorance | Where Minds Meet And Sparks Fly!