0

What is the difference between a site and a web in SharePoint

  • please clarify your question clearly, are you referring to server side object model or any object model? Its ambiguous – John Zachariah Jun 28 '17 at 8:59
  • I have trouble understanding why this would be an opinion-based question. The question could've been possibly clarified a bit, but then again I can easily understand why one could have a confusion between these terms, as they seem to be used crisscross. Many people refer to SPSites as sites in a context which includes the use of web, as both would be shortened versions of their full name already causing misunderstandings. – moe Jun 28 '17 at 16:13
  • Yeah I disagree with why this was closed too. Very useful question. And excellent answer moe. It was probably closed because he asked the question way too vaguely. should have added more context... but that doesn't make it "opinion based" that is silly. – Nicholas DiPiazza Mar 14 '18 at 15:36
3

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 SPWebs.

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.

| improve this answer | |
2

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).

| improve this answer | |
1

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/

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.