A Basic Interview Question: Can You Explain Every Part of a URL?

Let’s break down URLs piece by piece

(Photo by Bianca Castillo on Unsplash)

An ad campaign for a flashy new web service grabs your attention. You unlock your phone, choose your favorite internet browser, and type in the URL as best you can remember it. After a second or several (depending on your phone carrier) — voila, a fresh webpage has loaded before your eyes!

It’s a tale as old as time (or at least the late 1990s), but can you explain how that crucial component — the URL — functions? If you want to be a web developer, this is a very basic concept you must know. Let’s dive in.

What is a URL?



Domain Name



Query String


Putting It All Together


There are other parts and other rules for URLs but these are the URL components that you will see most often and that you should be prepared to be able to explain. Now go ace that interview!

Better Programming

Advice for programmers.

Andrew Koenig-Bautista

Written by

Junior Web Developer, bookworm, viewer of indie films. Passionate about problem-solving and building a more equitable -and joyful- world. Actively job seeking.

Better Programming

Advice for programmers.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade