Web Development /Introduction to Web Development / Lesson
Web Development

Understanding URLs, Domains, Hosting and Web Servers

📖

Lesson Content

Introduction

When you type a website address into a browser and press Enter,
many processes happen behind the scenes before the webpage appears.

To understand how websites work in the real world, a web developer
needs to understand several important concepts:
URLs, domains, DNS, hosting and web servers.

These concepts are closely connected. Understanding their relationship
will make it easier to understand how websites are published and accessed
over the Internet.

1. What Is a URL?

URL stands for Uniform Resource Locator.
A URL is an address used to locate a resource on the Internet.

A resource could be:

  • A webpage
  • An image
  • A video
  • A stylesheet
  • A JavaScript file
  • An API endpoint
  • A downloadable document

For example:

https://www.example.com/courses/web-development

2. Parts of a URL

A URL can contain several components.

https://www.example.com/courses/web-development?level=beginner

The major components include:

  • https — the protocol.
  • www — a subdomain.
  • example.com — the domain name.
  • /courses/web-development — the path.
  • ?level=beginner — the query string.

3. What Is a Protocol?

A protocol defines rules for communication between systems.

In web development, two common protocols are:

  • HTTP — HyperText Transfer Protocol.
  • HTTPS — HyperText Transfer Protocol Secure.

HTTPS uses encryption to help protect information exchanged between
a browser and a website.

4. What Is a Domain Name?

A domain name is a human-readable name used to identify
a website or Internet service.

For example:

example.com

Domain names are easier for people to remember than numerical IP addresses.

5. Domain Name vs URL

A domain name and a URL are related but they are not the same thing.

A domain might be:

example.com

A complete URL might be:

https://example.com/courses/web-development

The domain identifies the website, while the URL can identify a specific
resource or location within that website.

6. What Is a Subdomain?

A subdomain is a section of a domain that can be used to organize
different services or parts of a website.

For example:

blog.example.com
shop.example.com
academy.example.com

Here, blog, shop and academy
are subdomains of example.com.

7. What Is DNS?

DNS stands for Domain Name System.

DNS helps translate human-readable domain names into IP addresses
that computers can use to locate systems on a network.

For example, when you enter:

example.com

your device needs to discover which server is associated with that domain.
DNS helps provide that information.

8. Why DNS Is Important

Imagine having to remember a numerical address every time you wanted
to visit a website.

Domain names make the web easier for humans to use.
DNS provides the system that connects those names to network addresses.

A simplified process is:

  1. The user enters a domain name.
  2. The browser needs the server’s network address.
  3. DNS information is requested.
  4. The appropriate IP address is returned.
  5. The browser can then communicate with the server.

9. What Is an IP Address?

An IP address is a numerical address used to identify
a device or network interface on a network.

IPv4 addresses commonly appear in a format such as:

192.0.2.10

IPv6 uses a different and much larger address format.

You do not normally need to memorize a website’s IP address because
DNS allows people to use domain names instead.

10. What Is Web Hosting?

Web hosting is a service that provides the infrastructure
needed to store and deliver website files and application resources.

A website may contain:

  • HTML files
  • CSS files
  • JavaScript files
  • Images
  • Videos
  • PHP application files
  • Database information

Hosting providers make computing resources available so websites can
be accessed over the Internet.

11. What Is a Web Server?

A web server is software and, depending on context,
the computer infrastructure running that software, that responds to
web requests and delivers resources to clients.

Popular web server software includes:

  • Apache
  • Nginx
  • Microsoft IIS
  • Caddy

The web server receives requests and determines how to respond.

12. Web Server Software vs Hosting Server

These concepts are related but should not be confused.

A hosting server is the computing environment where websites and
applications can run.

Web server software, such as Apache or Nginx, handles HTTP requests
and responses.

A single hosting environment may run many different software components
at the same time.

13. How a Website Request Works

Consider a visitor entering:

https://example.com

A simplified version of what happens is:

  1. The browser interprets the URL.
  2. The browser needs to locate the domain.
  3. DNS information is used to find the appropriate server address.
  4. The browser establishes communication with the server.
  5. The browser sends an HTTP request.
  6. The web server receives the request.
  7. The server determines what response should be returned.
  8. The response is sent back to the browser.
  9. The browser processes the returned resources.
  10. The webpage is displayed.

14. Static Websites

A static website generally serves files that have already been created.

For example:

index.html
style.css
script.js
logo.png

The server can deliver these files directly to the browser.

15. Dynamic Websites

A dynamic website can generate or retrieve content based on information,
user requests or application logic.

For example, an online academy may display a different dashboard
depending on which student is logged in.

The application may retrieve the student’s courses and progress from
a database before generating the response.

16. Where Does WordPress Fit?

WordPress is an example of a platform that can be used to build
dynamic websites and applications.

A typical WordPress installation can involve:

  • PHP
  • MySQL or a compatible database system
  • HTML
  • CSS
  • JavaScript
  • A web server
  • Hosting infrastructure

When a visitor requests a WordPress page, the server-side application
can retrieve information from the database and generate the appropriate
response.

17. What Happens When You Open a WordPress Page?

A simplified WordPress request may look like this:

Browser
   ↓
Domain
   ↓
DNS
   ↓
Web Server
   ↓
WordPress
   ↓
Database
   ↓
WordPress
   ↓
HTML Response
   ↓
Browser

The actual architecture can be more complex, but this model provides
a useful foundation for understanding the process.

18. HTTP Requests

When a browser communicates with a web server, it uses HTTP or HTTPS.

Common HTTP methods include:

  • GET — retrieve information.
  • POST — submit information.
  • PUT — replace or update a resource.
  • PATCH — partially update a resource.
  • DELETE — request removal of a resource.

19. HTTP Status Codes

Servers use HTTP status codes to communicate the result of requests.

Common examples include:

  • 200 — successful request.
  • 201 — resource successfully created.
  • 301 — permanent redirect.
  • 302 — temporary redirect.
  • 400 — bad request.
  • 401 — authentication required.
  • 403 — access forbidden.
  • 404 — resource not found.
  • 500 — internal server error.

20. HTTP vs HTTPS

HTTP communicates without the encryption provided by HTTPS.

HTTPS uses TLS encryption to help protect data exchanged between
the client and server.

For modern websites, HTTPS is an important part of secure web communication.

21. What Is SSL/TLS?

You may hear the term SSL certificate when setting up
a website.

Modern HTTPS connections use TLS, which provides
cryptographic protection for network communication.

People still commonly use the phrase “SSL certificate” when referring
to the certificate used for HTTPS.

22. Domain Registration

Before a domain name can be used for a website, it normally needs to
be registered through a domain registrar.

Domain registration gives the registrant control over the domain
according to the registrar’s terms and the applicable domain registry rules.

The domain can then be configured with DNS records that point services
to the appropriate infrastructure.

23. Common DNS Records

DNS supports different record types for different purposes.

  • A — maps a domain name to an IPv4 address.
  • AAAA — maps a domain name to an IPv6 address.
  • CNAME — creates an alias to another domain name.
  • MX — identifies mail servers for a domain.
  • TXT — stores text information used for various purposes.

24. What Is a Nameserver?

A nameserver is a DNS server responsible for providing DNS information
for domains under its management.

When configuring a domain, you may be asked to change its nameservers
to those supplied by a hosting or DNS provider.

25. Practical Example: Publishing a Dwallnet Website

Imagine Dwallnet wants to publish an academy website.

A simplified setup might involve:

  1. Registering a domain.
  2. Obtaining web hosting.
  3. Pointing the domain’s DNS records to the hosting infrastructure.
  4. Installing WordPress or deploying the custom application.
  5. Uploading website files.
  6. Configuring the database.
  7. Enabling HTTPS.
  8. Testing the website.

After the configuration is complete, visitors can use the domain
to access the website.

26. Localhost vs Live Website

During development, developers often work on a local computer instead
of immediately publishing their project to the Internet.

A local development address might look like:

http://localhost/my-project

When the application is deployed publicly, it may instead be accessed
through a real domain.

https://example.com

27. Why Developers Use Local Development Environments

Local development environments allow developers to build and test
applications before making them publicly available.

They can test:

  • PHP applications
  • WordPress themes
  • WordPress plugins
  • Databases
  • HTML and CSS
  • JavaScript
  • APIs

This can make development faster and safer because unfinished changes
do not immediately affect the public website.

28. Understanding the Complete Picture

The following simplified diagram connects the major concepts:

User
  ↓
Browser
  ↓
URL
  ↓
Domain
  ↓
DNS
  ↓
IP Address
  ↓
Hosting Server
  ↓
Web Server
  ↓
Application
  ↓
Database
  ↓
Response
  ↓
Browser
  ↓
User

29. Practical Developer Knowledge

A web developer does not necessarily need to become a network engineer,
but understanding the basics of domains, DNS, hosting and web servers
is extremely useful.

These concepts help developers troubleshoot problems such as:

  • A website not loading.
  • A domain pointing to the wrong server.
  • DNS changes not appearing immediately.
  • HTTPS configuration problems.
  • Incorrect redirects.
  • Server errors.
  • Missing website files.

Conclusion

URLs, domains, DNS, hosting and web servers are fundamental components
of the modern web.

A domain gives users a memorable name, DNS helps locate the associated
infrastructure, hosting provides computing resources, and web server
software handles web requests and responses.

Understanding how these components work together gives you a much stronger
foundation for building, deploying and troubleshooting websites.

Enjoying this lesson?

Sign in to your Dwallnet Academy student account to track your learning progress and mark lessons as complete.

Sign In to Track Progress