The Internet
Tags: webdev, web, beginners
Published: 2022-11-03 08:39:59

**Getting Started with the Web** is a post series on getting started with web development that will help you understand and learn the basic parts of the World Wide Web to create your own web pages.

## The Internet

- How does the Internet work
- Hypertext Transfer Protocol (HTTP)
- Domain
- How the web works

## How the Internet works

The Internet is a collection of individual computers (and computer networks in businesses, schools, and organizations) that are generally all connected to each other, mainly through the network. The connections between computers are a mixture of old-fashioned copper cables, fiber-optic cables (which send messages in pulses of light), wireless radio connections (which transmit information via radio waves), and satellites.

## The way the Internet functions

There are two important concepts in how the Internet works: packets and protocols.

**Packets**: In networks, a packet is a formatted unit of data transmitted over a network connection. It consists of control information and user data (payload).
 
Control information includes source and destination addresses. The user data (payload) is the transmitted content, e.g. text, images or media files (audio, video).

When the packets arrive at their destination (computer), they are reassembled into the original data. This process is called packet switching

![Packets in networks - Mahmoud Elmahdi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/icjvw3e0jyhdgb8wyjp4.jpeg)

**Protocols**: The Internet Protocol (IP) is simply the addressing system of the Internet. All connected computers on the Internet are identified by an Internet Protocol 
(IP) address. 

A protocol is a set of rules that control the format of data sent over the Internet.

An IP address is a sequence of numbers separated by periods. IP addresses are expressed as a set of four numbers. Each number in this set can range from 0 to 255.

![IP address - Mahmoud Elmahdi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ercdt2u2htvd3lebnr99.jpeg)

### IP address examples

150.107.195.151
136.237.184.147
253.196.6.213
8.57.99.168
225.244.249.141
196.33.116.61

## Web hosting

Web hosting is a service that allows organizations and individuals to publish a website on the Internet. A web host, or web hosting service provider, is a company that provides the technologies and services necessary for the website to be displayed on the Internet. Websites are hosted, or stored, on special computers called servers, or web servers.

## Web server

Simply put, a web server is a computer that stores, processes, and delivers the files of a website to the web browsers.

Web servers consist of hardware and software that use the Hypertext Transfer Protocol (HTTP) to respond to requests made by web users browser

## Hypertext Transfer Protocol (HTTP)

The Hypertext Transfer Protocol (HTTP) is a set of rules that describe how information is exchanged over a network that allows a web client (browser) and web server to communicate with each other.

Web clients (browsers) and web servers communicate by exchanging individual messages; The messages sent by a web client (browser) are called **requests** and the messages sent by the web server (is response) are called **responses**

![HTTP - Mahmoud Elmahdi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d7bimvldzev1gbovp7q2.jpeg)

## Domain

The Domain Name System (DNS) is the yellow pages of the Internet. People access information online through domain names. Web clients (browsers) interact using Internet Protocol (IP) addresses.

A domain name can be any combination of letters and numbers, and it can be used in combination with the various domain name extensions, such as .com, .net, .co.uk and others.


![Domain - Mahmoud Elmahdi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kjuf4keyg20a6ei2qsd0.jpeg)

## Domain Name System (DNS)

A decentralized database that converts the domain name (e.g. google.com) into a corresponding computer-friendly IP address (e.g. 216.58.209.14).

The Domain Name System (DNS) translates domain names into IP addresses so that browsers can load Internet (web) resources.

Each device on the Internet is assigned an IP address, and this address is necessary to find the corresponding Internet device — just as a street address is used to find a particular house.

## How the web works

When you type or click the Uniform Resource Locator (URL) of a website into a client, a request is sent to the Internet Service Provider (IPS), which connects the web browser (client) to the server. The IPS then communicates with the Domain Name System (DNS) and checks the IP address of the server hosting the website. After it receives the IP address of the destination server, it sends it to the web browser, and the client receives the provided resources.


![The web - Mahmoud Elmahdi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gaaat0o6ns0i32btlal7.jpeg)