The site of a piece of web content is determined by the registrable domain of the host within the origin. This is computed by consulting a Public Suffix List to find the portion of the host which is counted as the public suffix (e.g. com, org or co.uk).
The concept of a site is used in SameSite cookies, as well as a web application's Cross-Origin Resource Policy.
Examples of the same site
https://developer.mozilla.org/docs/
https://support.mozilla.org/ |
same site because the registrable domain of mozilla.org is the same |
http://example.com:8080
https://example.com |
same site because scheme and port are not relevant |
Examples of different site
https://developer.mozilla.org/docs/
https://example.com |
not same site because the registrable domain of the two URLs differs |
Specifications
Specification |
Status |
Comment |
URL |
Living Standard |
Initial definition |