ScreenshotNeo

BlogGuides

What Is the Difference Between a URL and a Website?

A URL is an address for one resource; a website is a collection of linked pages and assets. Learn the parts, examples, and developer edge cases.

By the ScreenshotNeo team1 October 20266 min read

Short answer: A URL is an address that locates one Internet resource. A website is a collection of linked pages and related resources. A URL can point to a page inside a website, an image, a video, or another resource, so the terms are not interchangeable.

For example, https://cloudflare.com/learning/ is a URL. It identifies one resource: the /learning/ page on the cloudflare.com site. The website is the broader collection of pages and assets that share that site identity.

URL vs. website at a glance

Term What it is Example
URL A locator for a resource https://developer.mozilla.org/en-US/docs/Learn_web_development/
Website A collection of linked pages and associated resources MDN Web Docs as a whole
Domain name The human-readable host component inside many URLs developer.mozilla.org
Web page One document a browser can display The MDN URL above
Web server Software or hardware that stores and sends resources The infrastructure serving the site

MDN defines a URL as a text string specifying where an Internet resource such as a page, image, or video can be found (MDN URL glossary). Its web-browsing lesson defines a website as linked pages and associated resources sharing a unique domain name (MDN browsing the web).

What a URL contains

A URL can have several parts. In https://developer.mozilla.org/en-US/search?q=URL#results:

Part Value Purpose
Scheme https Selects the protocol used to access the resource.
Authority or host developer.mozilla.org Identifies the server location; it may also include a port and credentials.
Path /en-US/search Selects a resource or route on that host.
Query ?q=URL Sends optional name/value parameters to the server or application.
Fragment #results Points to a location within the returned document; it is not sent to the server.

Not every URL shows every part. A URL may be absolute, with scheme and host, or relative, such as ../images/logo.svg. A relative reference is resolved against the containing document’s URL; an address entered in the browser bar normally must be absolute enough for the browser to resolve on its own. See MDN’s URL guide.

How a website relates to URLs

  1. A person enters or follows a URL.
  2. DNS helps find the host named by the URL.
  3. The web server receives the request and returns files or an application response.
  4. The browser renders a page and requests additional URLs for stylesheets, scripts, images, fonts, and video.

One website therefore uses many URLs. A navigation menu might link to /about, /pricing, and /blog; each is a separate URL while all belong to one site. Conversely, a URL does not have to identify a website: it can identify a standalone image, downloadable file, API endpoint, or a non-HTTP resource.

Common points of confusion

URL vs. domain name

example.com is a domain name. https://example.com/docs?lang=en is a complete URL containing that domain plus scheme, path, and query. See Cloudflare’s explanation of domains and URLs.

URL vs. web page

A page is the document or application view returned to a browser. Its URL is the address used to request it. Multiple URLs can sometimes produce the same page, and one URL can display different data depending on authentication, cookies, or application state.

Website vs. web server

The website is the published collection. The server is the software and hardware that hosts and delivers it. A server outage can make a website unavailable, but the terms describe different things.

Single-page applications

A single-page app can change the displayed view without a full document navigation, so the URL may stay the same or change through the History API. It remains a website made of resources even when the browser does not reload a new page for every view.

Inspect the difference yourself

These programs split a URL into its components. They parse the address string; they do not download the whole website.

Python

from urllib.parse import urlsplit

address = "https://developer.mozilla.org/en-US/search?q=URL#results"
parts = urlsplit(address)
print("scheme:", parts.scheme)
print("domain:", parts.hostname)
print("path:", parts.path)
print("query:", parts.query)
print("fragment:", parts.fragment)

Node.js

const address = new URL('https://developer.mozilla.org/en-US/search?q=URL#results');
console.log({
  scheme: address.protocol,
  domain: address.hostname,
  path: address.pathname,
  query: address.search,
  fragment: address.hash
});

cURL

curl -I 'https://developer.mozilla.org/en-US/search?q=URL'

curl -I requests headers so you can observe the response for one URL. It does not enumerate every page in the website.

Capturing a URL to see one page of a website

A browser screenshot makes the distinction concrete: you give a capture tool one URL, and it returns an image of the resource rendered at that address. A full site would require a list of URLs discovered from navigation, a sitemap, or your own crawl rules.

DIY browser method with Playwright

import { chromium } from 'playwright';

const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
await page.goto('https://developer.mozilla.org/en-US/docs/Glossary/URL', { waitUntil: 'networkidle' });
await page.screenshot({ path: 'url-page.png', fullPage: true });
await browser.close();

Install it with npm install playwright. For production captures, add timeouts, retries, a browser pool, and limits for pages that never reach network idle.

Or skip the browser setup

ScreenshotNeo accepts one URL and returns a PNG, JPEG, WebP, or PDF. See the API documentation for all options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://developer.mozilla.org/en-US/docs/Glossary/URL -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://developer.mozilla.org/en-US/docs/Glossary/URL"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://developer.mozilla.org/en-US/docs/Glossary/URL' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed; response headers identify the page verdict and whether it was billed. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.

Edge cases developers should handle

  • Fragments: The browser may scroll to #section, but the fragment is not sent in the HTTP request.
  • Query strings: Parameter order, encoding, and repeated keys can change application behavior.
  • Redirects: The entered URL can redirect to another URL; record the final address when identity matters.
  • Authentication: The same URL can return different pages for different users or cookies.
  • Internationalized domains: Unicode names are represented using an encoded form for DNS and URL processing.
  • Trailing slashes and case: Servers may treat /docs and /docs/, or uppercase and lowercase paths, as different resources.
  • JavaScript routes: A single-page app may need JavaScript execution before its content appears.

Troubleshooting

Symptom Likely cause Fix
“The URL is the website.” Domain and URL are being treated as synonyms. Identify scheme, host, path, query, and fragment separately.
Relative link fails when pasted into a new tab. It depends on a containing document. Resolve it against the page’s base URL first.
Screenshot is blank. Content is client-rendered, blocked, or timed out. Wait for a selector or network idle, allow scripts, and inspect response status.
Unexpected screenshot content. Cookies, geolocation, authentication, or redirects changed the response. Use a controlled context and record the final URL and headers.
Capture hangs. A page keeps opening connections or loading third-party resources. Set a finite timeout, wait for a specific selector, and block unnecessary resource types.

Performance, reliability, and cost

  • Parse URLs locally when you only need their parts; no network request is required.
  • For crawling, deduplicate normalized URLs, respect robots and rate limits, and cap depth and total pages.
  • Cache immutable assets and use conditional requests where your client supports them.
  • For screenshots, reuse browser contexts, choose a deterministic viewport, and wait for a meaningful selector instead of an unbounded idle event.
  • Retry transient DNS, connection, and 5xx failures with exponential backoff; do not blindly retry authentication or 4xx errors.
  • ScreenshotNeo’s cache, bulk capture, async jobs, webhooks, and usage API can reduce orchestration work; only clean shots are billed.

FAQ

Can a website have one URL?

Yes. A small site can expose one page and one URL, while larger sites expose many.

Is a URL always a web address?

No. URLs can identify resources using schemes other than HTTP or HTTPS, including mail and file-related schemes.

Does changing the fragment create a new page?

Usually it changes a location or client-side state within the document. The fragment is not sent to the server.

Can two websites share a domain?

A domain can host multiple applications or subdomains. Define the site boundary by the pages and resources you intend to group, not by the URL string alone.

Sources