Skip to main content
Apply for a Cheap Website
Website explainer · 1:47

Network Ports Explained: The Number After a Website Hostname

What does the number after localhost mean in a preview address? A port helps direct a connection to the appropriate service on a device.

Jersey Web video: What does the port number do?

1:47 · No narration: the video shows each step as text on screen, and every step is written out below, with buttons that jump the video to it.

Download the on-screen text track (VTT)

The six points in the video

This is a silent video. The headings, explanations and labels below reproduce the information on screen.

  1. Step 1: The host identifies the destination

    A hostname or IP address identifies where the connection is going.

    On-screen labels: Hostname; IP address; Destination device.

  2. Step 2: The port identifies a service

    Different network services can listen on different ports.

    On-screen labels: Service port; Listening application; Intended connection.

  3. Step 3: A URL can show the port

    It appears after the host, separated by a colon.

    On-screen labels: Host name; Colon separator; Port number.

  4. Step 4: Web schemes have default ports

    HTTP commonly uses 80; HTTPS commonly uses 443.

    On-screen labels: HTTP 80; HTTPS 443; Scheme defaults.

  5. Step 5: Local previews often use others

    A development server can listen on its configured local port.

    On-screen labels: Preview application; Configured port; Running service.

  6. Step 6: Check the exact preview address

    A wrong port can reach another service or fail to connect.

    On-screen labels: Correct host; Correct port; Expected application.

A practical check for your business

Check the intended hostname, protocol and port together when investigating a connection. The relevant service and network configuration determine which address the application needs.

Sources and further detail

Common questions

What does the number after localhost mean in a preview address?

A port helps direct a connection to the appropriate service on a device. Use the port supplied for the intended service.

Go further

Guide Read the practical guide More context for planning and maintaining your business website. 5 min read → Jargon Buster Port explained Read the related Jargon Buster explanation. Read the explanation →

Use the port supplied for the intended service.

Tell Jersey Web what your website needs to do and which part you want help with.

Talk to Jersey Web →

More video tips

All 205 videos →
Length 1:47 Website connections

Parts of a Website URL Explained: Scheme, Host, Path, Query and Fragment

URL parts, explained.
Length 1:47 Website accessibility

Screen Readers Explained: How Website Structure Helps People Navigate

Screen readers, explained.
Length 1:47 Website accessibility

Semantic HTML Explained: Give Website Content the Right Meaning

Semantic HTML, explained.