Definition
Site (Web)
The site of a URL is its registrable domain, computed as eTLD+1: take the eTLD and add exactly one more label to the left. The +1 picks up the single label a registrant controls, so further labels such as
wwwor a project name are dropped — they name subdomains of the same registrant and do not change the site.Two hosts belong to the same site iff they share a registrable domain:
Host eTLD eTLD+1 (site) https://www.tuwien.ac.atac.attuwien.ac.athttps://old-project.tuwien.ac.atac.attuwien.ac.athttp://test.tuwien.ac.atac.attuwien.ac.athttps://lavish.github.iogithub.iolavish.github.ioThe first three are the same site despite differing in scheme and host — they all reduce to the shared registrable domain
tuwien.ac.at. By contrastlavish.github.iois its own site because the PSL listsgithub.ioas an eTLD. All four are still different origins.
Same Site Is Coarser Than Same Origin
Same site is coarser than same origin
The SOP is origin-based, but several security mechanisms — the cookie
Domainattribute, CORS, CSP, and postMessage trust decisions — use the coarser site boundary. A subdomain takeover lets the attacker escalate into the same site and undermine all of them. Site isolation in modern browsers explicitly does not mitigate cross-origin attacks within a site.
Example
Determining the site of four GitHub Pages URLs
The eTLD for
github.ioisgithub.ioitself (it is listed on the Public Suffix List so that each user gets an isolated registrable domain). The registrable domain is therefore the next label, i.e. the username:
URL eTLD Registrable domain Site relation https://lavish.github.iogithub.iolavish.github.io— https://beerphilipp.github.iogithub.iobeerphilipp.github.iocross-site to the row above https://test.tuwien.ac.at:8080ac.attuwien.ac.atunrelated site So although
lavish.github.ioandbeerphilipp.github.iolook like two pages of the same service, they are different sites (and different origins), and a cookie set for one is not sent to the other. By contrasttest.tuwien.ac.at:8080andwww.tuwien.ac.atare the same site despite differing in host and port — the registrable domaintuwien.ac.atis shared — though they are still different origins, so the SOP keeps their DOMs separate.