Development

Internet Basics: IP Addresses, DNS and HTTPS Explained

Learn what happens when you open a website, how IP addresses, DNS and HTTPS work, and how to investigate common connection problems.

Home router illustrated connecting a laptop and phone over Wi-Fi
Concept illustration from the Circuit Compass image library.

Opening a website involves several different systems. Understanding the role of each one helps you learn web development and describe connection problems more clearly. Start with the journey from a device to a page, then try the small observation exercise below.

Learn the terms by the job they do

The pieces involved in reaching a website
TermRoleUseful distinction
Wi-FiConnects your device wirelessly to a local networkA strong signal does not prove the internet connection works
RouterMoves traffic between networksA home router often combines routing, Wi-Fi and other functions
IP addressAddresses a network interface so traffic can be routedIt is not a permanent identity for a person
DNSResolves names through records, including address recordsA website name may lead to multiple addresses
HTTPDefines web requests and responsesA working connection can still return an error response
HTTPSProtects HTTP traffic using TLSEncryption does not prove that a site’s claims are trustworthy

What happens when you open a website?

The browser interprets the address and may use cached information to resolve the hostname. DNS helps find the service’s network address. The browser then establishes a connection and, for HTTPS, negotiates a protected connection and checks the certificate.

It sends a request for a resource. The server returns a response, which includes a status code and may include HTML. As the browser processes the document, it can request stylesheets, scripts, fonts and images. It combines these resources into the page you see.

This is a simplified route: caches, redirects, service workers and content delivery networks can change where requests go or whether a new network request is needed. See MDN’s introduction to how the web works for the basic request journey.

Read a URL one piece at a time

https://example.com/lessons?topic=networking#practice

https is the scheme; example.com is the hostname; /lessons is the path. The query string contains topic=networking. The fragment #practice can identify a location within a document and is not sent as part of the HTTP request target.

Pay attention to the actual hostname when checking a link. A familiar brand appearing in the path or query does not make that brand the site owner. For example, example.com/bank-name is still a page on example.com.

Exercise: watch a page load

  1. Open a public information page that does not require signing in.
  2. Open the browser’s developer tools and choose the Network panel.
  3. Reload the page and look for the main document request.
  4. Inspect its status, content type and timing, then compare it with an image request.
  5. Reload again and look for resources served from a cache.

You should usually see more than one request because a page is made from several resources. The precise timings and addresses will vary. A cached resource may not need a full download, so two reloads need not transfer the same amount of data.

Do not share an unedited network export from a signed-in session. Request headers and URLs can contain tokens or personal information. This exercise only requires observing a public page.

Separate connection problems from website problems

If one page fails, first try another page on that site and an unrelated site. Then compare another device on the same network. These observations narrow the problem without immediately changing router settings.

Symptoms are clues, not a diagnosis
ObservationNext check
Only one browser failsCheck its extensions, proxy settings and a private window
All devices lose internet accessCheck the router’s WAN status and whether the provider reports an outage
A name-resolution error appearsVerify the hostname and check whether other names resolve
The server returns 404Check the path; the requested resource was not found
The server returns a 5xx statusThe response reports a server-side failure; repeated local resets may not help

Record the exact message and time before changing anything. A screenshot with private details removed is more useful to support than “the internet is broken.” For home wireless issues, continue with our Wi-Fi troubleshooting guide.

Check your understanding

Can Wi-Fi work while the internet is down?

Yes. Your device may still communicate with a local printer or router even when the connection to your internet provider is unavailable.

Does HTTPS mean a website is safe to buy from?

No. It protects the connection to the named site. A deceptive site can also use HTTPS, so check the identity, reputation and transaction details separately.

Will changing DNS always make downloads faster?

No. Name resolution is only one part of reaching a service. Wi-Fi quality, provider capacity, server load and other factors affect transfer performance.

Sources and further reading

Consult the linked documentation for details and version-specific requirements. The exercises are designed for learning; results can vary with your browser and environment.

Found something that needs updating? Send a correction with the page URL and a supporting source. Read our editorial policy.