1.01 Web Requests

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

20 Terms

1
New cards

Domain name

The human-friendly name of a site, like google.com. Analogy: the restaurant's name.

2
New cards

IP address

The number computers use to find each other, like 142.250.80.46. Analogy: the restaurant's street address.

3
New cards

DNS

The system that translates a domain name into an IP address. Analogy: looking the restaurant up in Maps.

4
New cards

Port

A numbered door on a server, each for a specific service. Analogy: which entrance you use.

5
New cards

Port 443

The standard port for HTTPS, the secure web. The main entrance.

6
New cards

Port 80

The standard port for plain HTTP, the unencrypted web.

7
New cards

Port 22

The standard port for SSH, remote login to a machine. Analogy: the staff door.

8
New cards

HTTP request

The message a browser sends asking for something, like GET the home page. Analogy: your order.

9
New cards

HTTP response

The server's reply: a status code, headers, and the content. Analogy: the waiter's reply plus the food.

10
New cards

Status code 200

OK. The request worked and the content came back.

11
New cards

Status code 404

Not Found. The server was reached, but that page doesn't exist.

12
New cards

Status code 500

Internal Server Error. The server itself broke. Analogy: the kitchen's on fire.

13
New cards

NXDOMAIN

DNS has no record for that name, so you never reach any server. The chain broke at the DNS lookup.

14
New cards

404 vs NXDOMAIN

404: you reached the server but the page is missing. NXDOMAIN: DNS failed, so you never arrived at all.

15
New cards

nslookup

A terminal command that asks DNS for a domain's IP address.

16
New cards

ping

A terminal command that checks whether a host is reachable and measures the round trip in milliseconds.

17
New cards

curl -I

Sends an HTTP request and shows only the response headers, including the status code.

18
New cards

The six stops of a web request

  1. Type a name. 2. DNS lookup. 3. Get the IP address. 4. Connect on a port. 5. Send the HTTP request. 6. Get the HTTP response.
19
New cards

How to debug a site that's down

Check each stop in order: does DNS resolve (nslookup), is the host reachable (ping), and what status code comes back (curl -I).

20
New cards

Interview: What happens when you type a URL into a browser?

The browser resolves the domain to an IP with DNS, connects to that IP on port 443 and sets up encryption, sends an HTTP GET request, and the server returns a status code like 200 plus the HTML, which the browser renders.