Skip to content

Website Basics

Website common knowledge

NameDescriptionExample
Domain name
A human-readable identifier used to identify a server or group of servers. Enter the domain name to access the websiteexample.com
IP addressAn identifier used to uniquely serve the server on the Internet192.168.1.1
PortA number that distinguishes different applications on a computer networke.g. Web service HTTP port is 80
HTTPS port is 443
Domain Name System (DNS)Responsible for resolving domain names into corresponding IP addresses
example.com resolves to 192.168.1.1
SSL certificateUsed to establish an encrypted connection between a client and a server and to verify the server's identity.*.example.com, mail.example.com
Access Protocol
Defines the rules for communication between clients and servers. Common access protocols include HTTP and HTTPS, used for normal communication and secure communication respectively. Using HTTPS requires deploying an SSL certificate, otherwise you can only use HTTPhttps:// or http://
Access address (URL)The full address of the website the user is accessing, including protocol, domain name or IP address, port (if not the default port) and pathhttps://www.example.com:7800/about
Web ServerUsed to process client requests and return requested data to the clientNginx, Apache, IIS, etc.
PHPUsed to process dynamic web pages, such as dynamic data, database queries, etc.PHP 8.5
Node.jsUsed to process dynamic web pages, such as dynamic data, database queries, etc.Node.js 24.15.0
MySQLUsed to store and manage dataMySql 8.0, MariaDB 10.5

Relationship Between Domain Name and IP Address

A domain name is a human-readable label, while an IP address is the actual numeric identifier of a server on the network. They work together to enable website access:

  1. One-to-One:

    One domain name points to one IP address. For example, example.com192.168.1.1 . This is the most common setup.

  2. One-to-Many:

    One domain name can point to multiple IP addresses (via multiple A records) for load balancing and redundancy. For example, example.com192.168.1.1 and 192.168.1.2.

  3. Many-to-One:

    Multiple domain names can point to the same IP address. For example, example.com, www.example.com, and blog.example.com all resolve to 192.168.1.1. The web server uses the Host header to distinguish which site to serve.

How It Works

User enters domain name in browser

Browser queries DNS server

DNS resolves domain to IP address

Browser connects to the IP address via HTTP/HTTPS

Web server receives the request and identifies the site by the Host header

Web server returns the website content

Key Points

  • You cannot access a website with only a domain name — the domain must be resolved to an IP address through DNS.

  • You can access a website directly via IP address if the server is configured to respond to direct IP requests.

  • DNS propagation — After adding or modifying a DNS record, it may take a few minutes to 48 hours for the change to take effect globally.

Access address (URL) disassembly

  • For example: https://www.example.com:7800/about

    NameExample
    Protocolhttps:// or http://
    Domain name/IP addresswww.example.com or 192.168.1.1
    Port:7800
    Path/about

HTTP vs HTTPS

FeatureHTTPHTTPS
Full NameHyperText Transfer ProtocolHyperText Transfer Protocol Secure
Port80443
EncryptionData is transmitted in plain textData is encrypted via SSL/TLS
SecurityVulnerable to eavesdropping and tamperingProtects data integrity and privacy
SSL Certificate
Not requiredRequired
  • Why use HTTPS?

    Without HTTPS, data transmitted between the browser and server (such as login credentials, form submissions) can be intercepted or modified by third parties. HTTPS ensures data is encrypted during transmission, which is essential for security and is also a ranking factor for search engines like Google.

  • How to enable HTTPS:

    Deploy an SSL certificate on the web server. Once configured, the site can be accessed via https://.

Common Ports

PortServiceDescription
80HTTPDefault port for unencrypted web traffic
443HTTPSDefault port for encrypted web traffic
22SSHSecure remote server management
21FTPFile transfer protocol
3306MySQLMySQL database service
53DNSDomain name resolution
25SMTPEmail sending

SSL certificate

An SSL certificate encrypts data transmitted between a client (browser) and a server, ensuring that sensitive information like passwords and payment details cannot be intercepted. It also verifies the server's identity.

Certificate Types

  • *.example.com (Wildcard Certificate):

    A wildcard certificate that matches one level of subdomains, such as www.example.com, mail.example.com. It does not match multi-level subdomains like bb.cc.example.com.

  • www.example.com (Single Domain Certificate):

    A certificate that protects a single specific domain, such as www.example.com or example.com. If you need to secure both example.com and www.example.com, you may need a certificate that includes both domains or a wildcard certificate.

  • Multi-Domain Certificate (SAN/UCC):

    A single certificate that can protect multiple different domain names, such as example.com, example.org, and mail.example.net. Each domain is listed as a Subject Alternative Name (SAN) in the certificate.

Certificate Validation Methods

  • File Validation (HTTP/HTTPS): The Certificate Authority (CA) verifies domain ownership by placing a verification file in the website's root directory and accessing it via HTTP/HTTPS.

  • DNS Validation: The CA verifies domain ownership by checking a specific DNS TXT or CNAME record added to the domain's DNS configuration. This method supports wildcard certificates.