12 KiB
| title | chunk | source | category | tags | date_saved | instance |
|---|---|---|---|---|---|---|
| Site - Glossary | MDN | 1/3 | https://developer.mozilla.org/en-US/docs/Glossary/Site | reference | web, html, css, javascript, documentation | 2026-05-05T05:45:23.953476+00:00 | kb-cron |
MDN HTML HTML: Markup language
HTML reference
HTML guides
Markup languages
CSS reference
CSS guides
Layout cookbook
JavaScriptJS JavaScript: Scripting language
JS reference
JS guides
Web APIs Web APIs: Programming interfaces
Web API reference
Web API guides
- Using the Web animation API
- Using the Fetch API
- Working with the History API
- Using the Web speech API
- Using web workers
Technologies
Topics
Learn Learn web development
Frontend developer course
- Getting started modules
- Core modules
- MDN Curriculum
- Check out the video course from Scrimba, our partner
Learn HTML
Learn CSS
Learn JavaScript
Tools Discover our tools
About Get to know MDN better
Site
Informally, a site is a website, which is a collection of web pages, served from the same domain and maintained by a single organization, defined by its registrable domain.
Browsers sometimes need to distinguish precisely between different sites. For example, the browser must only send SameSite cookies to the same site that set them.
For this more precise definition a site is determined by the registrable domain portion of the domain name. The registrable domain consists of an entry in the Public Suffix List plus the portion of the domain name just before it. This means that, for example, theguardian.co.uk, sussex.ac.uk, and bookshop.org are all registrable domains.
According to this definition, support.mozilla.org and developer.mozilla.org are part of the same site, because mozilla.org is a registrable domain.
In some contexts, the scheme is also considered when differentiating sites. This would make http://vpl.ca and https://vpl.ca different sites. Including the scheme prevents an insecure (HTTP) site from being treated as the same site as a secure (HTTPS) site. A definition that considers the scheme is sometimes called a schemeful same-site. This stricter definition is applied in the rules for handling SameSite cookies.
Note: Browsers sometimes make security decisions (for example, deciding which resources a script can access) based on the Origin of a resource. This is a more restrictive concept than the site, encompassing the scheme, the whole domain, and the port. See also same-origin policy.
In this article
Examples
These are the same site because the registrable domain of mozilla.org is the same:
https://developer.mozilla.org/en-US/docs/https://support.mozilla.org/en-US/
These are considered the same site because the port number is ignored when determining the site:
https://example.com:8080https://example.com
These are not the same site because the registrable domain of the two URLs differs:
https://developer.mozilla.org/en-US/docs/https://example.com
These are the same site, or different sites if the scheme is considered:
http://example.comhttps://example.com
See also
- What is a URL
- Related glossary terms:
- Same-origin policy