What is the difference between a site and a web in SharePoint
3 Answers
An answer from StackOverflow.SE puts it in a nutshell:
UI Term API Class Name ------- -------------- Site Collection SPSite Site SPWeb
This basically means, that when talking about SharePoint's API classes, we refer to site collections as SPSite
and to sites as SPWeb
. To focus on the API class terms, SPSite
would therefore be the parent of a SPWeb
, which holds one or many SPWeb
s.
Also an answer at Getting my head round spsite vs spweb vs anything else dating back +5,5 years would still be valid to give you the overview of SharePoint's architecture.
In SharePoint Object Model, SPSite
(Server Object Model -SSOM) or Site
(Client Side Object Model - CSOM) refer to Site collection object
while a SPWeb
(SSOM) or Web
(CSOM) refers to Sub Site Object
. Also note that every site collection has a root web, which can be accessed by using site collection object like SPSite.RootWeb
or Site.RootWeb
(CSOM).
-
Also, In the REST API, the root web is called
webId
which certainly helped muddy the waters even more.– AndyJun 15, 2021 at 6:51
Site represents site collection we can access it using SPSite. Web represents simple site we can access it using SpWeb. Hirarchy of sharepoint is SharePoint: Farm->Web Application->Site Collection->Site->List/Library-> List Items
You can check it in detail on link below: http://www.c-sharpcorner.com/uploadfile/Roji.Joy/difference-between-web-application-site-collection-and-site/
SPSite
s as sites in a context which includes the use ofweb
, as both would be shortened versions of their full name already causing misunderstandings.