{"id":456,"date":"2019-09-11T16:39:10","date_gmt":"2019-09-11T16:39:10","guid":{"rendered":"http:\/\/coventry.domains\/learn\/?p=456"},"modified":"2019-10-09T14:12:16","modified_gmt":"2019-10-09T14:12:16","slug":"subdomains-vs-directories","status":"publish","type":"post","link":"https:\/\/coventry.domains\/learn\/subdomains-vs-directories\/","title":{"rendered":"Subdomains Vs Directories"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Consider this scenario: you want to have a personal blog on your new Web space, where you share pictures and short written pieces with family,  friends, and colleagues. In addition, you\u2019re working on a large research  project that requires you to build a Web-based repository of digital  images related to your discipline. You want to use one application (for example, <a rel=\"noreferrer noopener\" href=\"http:\/\/wordpress.org\/\" target=\"_blank\">WordPress<\/a>) to manage your personal blog. For your research project, you\u2019ve settled on another open-source application (let\u2019s say, <a rel=\"noreferrer noopener\" href=\"http:\/\/omeka.org\/\" target=\"_blank\">Omeka<\/a>).  Both of these are applications that need to be installed on your Web host, but you can\u2019t just put them both on your main domain name \u2013 if you did, both sites would quickly experience conflicts and errors. You need to cordon off separate spaces for your different Web \u201cproperties.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are two primary strategies for parceling up your Web space. You can create <strong>subdomains&nbsp;<\/strong>or&nbsp;<strong>directories<\/strong>. But before you can understand the difference, you need to first understand what we mean when we talk about your <strong>root<\/strong> domain.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Root domain<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say you\u2019ve registered a new subdomain for Coventry.Domains called pseudonym.coventry.domains. Anything that is stored at this core <a href=\"http:\/\/coventry.domains\/learn\/anatomy-of-a-url\/\">URL<\/a> is considered to be at the <strong>root<\/strong> of your domain: nothing comes before the address or after the address. You can certainly decide that you simply want to have a single site on your Web host (say a blog running WordPress), and you can set that blog up at your domain\u2019s root. To get to your site in this scenario, users would simply go to pseudonym.coventry.domains.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Subdomains<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you want to do more than just have a single website on your domain, you need to decide now to organize your space. One way to do so is by setting up <strong>subdomains<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You\u2019re already familiar with the concept of subdomains, even if you don\u2019t know it. Consider Coventry University\u2019s public website at <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/coventry.ac.uk\/\" target=\"_blank\">https:\/\/coventry.ac.uk<\/a>.  As you browse parts of that site, you\u2019ll notice that the domain changes. When you\u2019re looking at your department website, for example the site for the Library team&#8217;s Locate service at\u00a0<a rel=\"noreferrer noopener\" href=\"http:\/\/locate.coventry.ac.uk\/primo_library\/libweb\/action\/search.do\" target=\"_blank\">http:\/\/locate.coventry.ac.uk\/<\/a>, the URL <abbr title=\"Uniform Resource Locator\">is no longer just coventry.ac.uk. Now the root of the URL is <strong>locate.coventry.ac.uk<\/strong>, indicating that you\u2019re on a different area that is dedicated to the Locate library online system.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"733\" src=\"http:\/\/coventry.domains\/learn\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-11-at-5.33.48-PM-1024x733.png\" alt=\"Screenshot of website locate.coventry.ac.uk\" class=\"wp-image-457\" srcset=\"https:\/\/coventry.domains\/learn\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-11-at-5.33.48-PM-1024x733.png 1024w, https:\/\/coventry.domains\/learn\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-11-at-5.33.48-PM-300x215.png 300w, https:\/\/coventry.domains\/learn\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-11-at-5.33.48-PM-768x550.png 768w, https:\/\/coventry.domains\/learn\/wp-content\/uploads\/2019\/09\/Screen-Shot-2019-09-11-at-5.33.48-PM.png 1882w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you browse to the student pages at\u00a0<a rel=\"noreferrer noopener\" href=\"http:\/\/students.coventry.ac.uk\/\" target=\"_blank\">students.coventry.ac.uk<\/a> you will notice that the domain changes again, this time indicating that you\u2019re in the Students Pages of the Coventry University website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As you can see the domains serve two purposes: they help to organize the site from a technical perspective, but they also serve as indications to the users that they are in a new\/different space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As you work on your Coventry.Domains space, you\u2019re welcome to create as many subdomains as you like, and in each subdomain you can create a distinct, individual website.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Directories<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The alternative for organizing your space is to simply set up directories. These function much like file folders on your computer. Instead of creating a blog on a subdomain at <strong>blog.pseudonym.coventry.domains<\/strong> you would place it in a directory called \u201cblog\u201d making the address <strong>pseudonym.coventry.domains\/blog<\/strong>.  Setting up a directory is really easy. You can create folders on the fly when installing applications (like WordPress), and you can also manually create them in your <a href=\"https:\/\/coventry.domains\/learn\/accessing-your-files-through-the-file-manager\/\">file manager<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is one particular issue you need to be aware of. Let\u2019s say you\u2019ve installed WordPress to be your primary blog at <strong>pseudonym.coventry.domains<\/strong>. Later, you decide you want to create another image gallery site on your site, and you want to place it at <strong>pseudonym.coventry.domains\/gallery<\/strong>. But, if for some reason you\u2019ve already created a page on your WordPress site called \u201cGallery\u201d then the URL <strong>pseudonym.coventry.domains\/gallery<\/strong> will already be taken. If you try to create a directory of the same name, you\u2019ll get a conflict and errors.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Tips and review<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Subdomains<\/strong> are generally a cleaner, more elegant  solution to organizing your site. You\u2019re less likely to get conflicts or errors. However, when using subdomains the process is slightly more  complicated: You must create subdomains first before you can install  anything in them. <\/li><li><strong>Directories<\/strong> don\u2019t  create as pretty URLs as subdomains, but they\u2019re easier to set up. They can, however, result in conflicts with existing Web pages. <\/li><li>As soon as you create subdomains or directories to organize your site, you need to consider how people are going to find them. If you\u2019ve created a new primary blog at <strong>pseudonym.coventry.domains\/blog<\/strong>, and someone goes to just <strong>pseudonym.coventry.domains<\/strong>, they won\u2019t see that new site. You can create links from pages on one subdomain or directory of your site to another. <\/li><li> If you really just need one site, installing at the root of your domain is the easiest thing to do, at least as you\u2019re getting started. You can always add more pieces to your territory later with either subdomains or directories. <\/li><\/ul>\n\n\n\n<p class=\"has-background has-very-light-gray-background-color wp-block-paragraph\">This content is adapted from the <a href=\"http:\/\/create.ou.edu\/docs\/\">Create Documentation<\/a> by The University of Oklahoma\u2019s <a href=\"http:\/\/www.ou.edu\/cte\">Center for Teaching Excellence<\/a> which is licensed under a <a href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">Creative Commons Attribution-ShareAlike 4.0 International License<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Consider this scenario: you want to have a personal blog on your new Web space, where you share pictures and short written pieces with family, friends, and colleagues. In addition, you\u2019re working on a large research project that requires you to build a Web-based repository of digital images related to your discipline. You want to [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[23,19],"tags":[],"class_list":["post-456","post","type-post","status-publish","format-standard","hentry","category-how-to-plan-a-website","category-think"],"_links":{"self":[{"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/posts\/456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/comments?post=456"}],"version-history":[{"count":4,"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"predecessor-version":[{"id":659,"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/posts\/456\/revisions\/659"}],"wp:attachment":[{"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coventry.domains\/learn\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}