Dark Arts
  • index
  • BUY ME A BOOK
  • 🪄Dark Magic
    • Pentesting
      • Industry Methodologies
    • Scopes of Testing
    • Reconnaissance
      • Passive
        • WHOIS
        • DNS
          • nslookup
          • dig
        • WAF
        • Subdomain
        • Google Dork
        • Misc. Techniques
        • Leaked Passwords
      • Active
        • Browser & Plugins
        • ping & traceroute
        • fping
        • telnet & netcat
        • DNS
          • Zone Transfer
          • DNS Amplification DDoS Attack Breakdown
        • Misc. Techniques
    • Vulnerability Assessment
    • Attack Types
  • 🕷️Aragoogs Nest
    • Web Application Overview & Security
      • Security Testing
      • Common Threats & Risks
    • Web Application Architecture
      • Technologies
    • HTTP/S
      • Message
      • Request
      • Response
        • Status Code
    • Crawling/Spidering
  • 🧪Potions
    • Web Browsers
    • Computer Networking
      • Network Protocol
      • Packets
      • OSI Layer
        • Layer 3: Network
        • Layer 4: Transport
      • DNS
        • Primary-Secondary
        • Local Name Resolution
        • Domain Hierarchy
        • FQDN
        • Lookups
        • DNS Resolution
        • DNS Records
        • Security: Attack-Defense (Default)
  • 🎆Spells
    • 📜Linux Scroll
    • 📜WebShell Scroll
    • git
      • Attacks + Vulnerabilities
  • 🖼️Flaws w/ Magical Frameworks
    • Windows
      • In a Nutshell
      • CVE-2019-0708: BlueKeep
      • CVE-2017-0144: EternalBlue: MS17-010
      • Attacking Services
        • MS IIS - WebDAV
        • SMB
        • HTTP File Server (HFS)
        • Apache Tomcat Web Server
        • RDP
        • WinRM
      • File System Vulnerabilities
      • Credential Dumping
        • Password Search in Windows Configuration Files
        • Mimikatz
        • Pass-the-Hash Attack
    • Linux
      • In a Nutshell
      • CVE-2014-6271: Shellshock
      • Attacking Services
        • FTP
        • SSH
        • SAMBA
        • SMTP
        • RSYNC
      • Dumping Hashes
  • 🌼Marauder's Boost
    • Privilege Escalation
    • Windows PrivEsc
      • Windows Kernel Exploit
      • Bypassing UAC
      • Access Token Impersonation
    • Linux PrivEsc
      • Linux Kernel Exploit
      • Misconfigured Cron Jobs
      • Exploiting SUID Binaries
      • shells
      • File Permissions
  • ☠️Death Eaters
    • Post Exploitation
      • Windows
      • Linux
  • 🪄OLLIVANDERS
    • nmap
      • Host Discovery
      • Port Scan
      • Service & OS
      • NSE
      • Firewall/IDS Evasion
      • Scan Optimization
      • Misc. Methods
    • ffuf
    • Hydra
    • Metasploit Framework
      • Architecture
      • Must to Know
      • msfvenom
      • Auxiliary Modules
      • Service Enumeration
      • Vulnerability Scanning
      • Imports
      • Automating
    • Vulnerability Scanners
    • Wireshark
  • 🚂Platform 9(3/4)
    • Auth-Auth
      • Authentication
        • Password-based Authentication
        • Basic Authentication
        • Multi-factor Authentication
        • Access Token
        • Token-based Authentication
          • JWT
          • OAuth 2.0
    • Secure Headers
      • Content-Security-Policy (CSP)
    • Cryptography
      • Caesar Cipher
  • ⛲Port Pensieve
    • Enumeration
      • SMB & NetBIOS
      • SNMP
    • Wordlists
  • 🔆DUELS
    • Pivoting
    • SMB Relay Attack
  • 🗺️Marauder's Map
    • Web Application Pentesting
    • API Pentesting
      • GraphQL
        • Primer
    • Mobile Application Pentesting
  • 🎧SIDE CHANNEL
    • Side Channel Analysis
    • Timing Side-Channel Attacks
      • Vulnerable Login
  • 🥃Sky
    • Cloud Basics
    • Cloud Management
      • Shared Responsibility Model
    • Using Cloud Resources
      • Monitoring & Alerts
      • Identity & Access Management
      • Scalability & Availability
      • Solution Design
    • Cloud Providers
    • Cloud Security & Regulatory Compliance
      • Resource Protection
      • ICCA: Cloud Security & Regulatory Compliance
    • ICCA Preparation
      • Knowledge Tests
      • Lab
  • 🔷Obsidian
    • Pentest Engagement
      • Scoping
    • Pentest Ethics
      • Rules of Engagement
    • Auditing Fundamentals
      • Process/Lifecycle
      • Pentest & Security Auditing
      • GRC
      • Standards, Frameworks & Guidelines
      • From Audit to Pentest
  • 💢Threat Modeling
    • Why Threat Model?
  • 📡THREAT INTEL
    • Threat Intelligence
    • Tool Dump
  • 📱Anything-Mobile-IoT
    • Firmware
    • Firmware Analysis
      • Example: CVE-2016-1555
    • Firmware Installation/Flashing
  • 🎉Mischeif
    • Social Engineering
    • Phishing
      • GoPhish
    • Pretexting
Powered by GitBook
On this page
  • What is Domain Hierarchy?
  • Components
  • Root (.)
  • Top-Level Domain (TLD)
  • Second-Level Domain (SLD)
  • Subdomains
  • x.y.z.com
  • Key Difference
  1. Potions
  2. Computer Networking
  3. DNS

Domain Hierarchy

PreviousLocal Name ResolutionNextFQDN

Last updated 9 months ago

What is Domain Hierarchy?

Domain hierarchy refers to the structured, layered organization of domain names within the Domain Name System (DNS). It breaks down domain names into different levels, starting from the most general (root) to the most specific (subdomains). This hierarchy is read from right to left in a domain name.

Components

Root (.)

The topmost level of the hierarchy, often represented by an implicit dot at the end of a domain name. It doesn’t appear in URLs but is the starting point for DNS resolution.

Top-Level Domain (TLD)

This is the first visible layer after the root and is the rightmost part of a domain name, such as:

  • Generic TLDs (gTLDs): .com, .org, .net, etc., which are used for general purposes and not restricted to specific countries.

  • Country Code TLDs (ccTLDs): .uk, .jp, .us, etc., which are used to represent specific countries or territories.

Second-Level Domain (SLD)

The Second-Level Domain (SLD) is the part of the domain name immediately before the TLD, representing the main label for a website. Organizations and individuals register SLDs relevant to their brand or purpose, such as example.comor amazon.co.uk. SLDs are typically limited to 63 characters.

Subdomains

Subdomains are labels added to the front of a domain name, sitting on the left side of the SLD. They allow website owners to create separate sections within their main domain, such as blog.example.com or shop.google.com. Subdomains follow the same creation restrictions as SLDs, including character limits, and are separated by periods from the main domain.

x.y.z.com

Here, we will talk about - What is the difference between a third-level domain and a subdomain? For example, in x.y.z.com, how would the components be broken down?

In the domain x.y.z.com, the third-level domain and subdomain are essentially the same concept, though they are often described differently depending on the context.

Entity
Hierarchy
Explanation

.com

TLD

This is the highest level in the domain hierarchy, indicating the category or type of domain, such as .com, .org, or a country-specific TLD like .uk.

z

SLD

This is the main domain name registered under the TLD. In this case, z is the second-level domain, which could represent a company or website.

y

Third-Level Domain

This is the next level after the second-level domain. Here, y is considered the third-level domain because it is directly under the second-level domain (z.com).

x

Fourth-Level Domain

This is an additional subdomain under the third-level domain (y.z.com). The term "subdomain" is generally used to refer to any domain name that is part of a higher-level domain.

Key Difference

  • Third-Level Domain: Refers specifically to the domain that comes after the second-level domain (e.g., y in y.z.com). It’s part of the domain hierarchy and is counted from the right.

  • Subdomain: A broader term that refers to any domain that exists under a higher-level domain. In x.y.z.com, both x and y are subdomains of z.com, but y is also specifically the third-level domain.

In short, all third-level domains are subdomains, but not all subdomains are third-level domains. Subdomains can go beyond three levels (like x.y.z.com) and still be called subdomains.

Note: The maximum length of a domain name, including the TLD, is 253 characters. This includes the total length of the domain name and all its labels (e.g., subdomain.example.com). Each label within the domain name can be up to 63 characters long.

🧪