{"id":420,"date":"2020-05-23T11:41:25","date_gmt":"2020-05-23T11:41:25","guid":{"rendered":"https:\/\/knight.domains\/support\/uncategorized\/subdomains-vs-subdirectories-2\/"},"modified":"2022-07-15T20:03:52","modified_gmt":"2022-07-15T20:03:52","slug":"subdomains-vs-subdirectories","status":"publish","type":"post","link":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/","title":{"rendered":"Subdomains vs. Subdirectories"},"content":{"rendered":"\n<p>When you&#8217;re first getting started with a new space on a new Web host, you might think of yourself as owning a small \u201cterritory\u201d of the Web. Everything you place in your public folder on the server becomes available for anyone on the Web to see (assuming they know the address of your site and the files you&#8217;ve placed there).<\/p>\n\n\n\n<p>If you&#8217;re just putting up a handful of static,&nbsp;HTML&nbsp;pages which you want to make available to colleagues, friends, or family by sending them links, then working with this large, unorganized space may work. But as soon as you get to the point where you want to organize your site, you&#8217;re going to need a new strategy.<\/p>\n\n\n\n<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&#8217;re 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 (say,&nbsp;<a href=\"http:\/\/wordpress.org\/\">WordPress<\/a>) to manage your personal blog. For your research project, you&#8217;ve settled on another open-source application (Say,&nbsp;<a href=\"http:\/\/omeka.org\/\">Omeka<\/a>). Both of these are applications that need to be installed on your Web host, but you can&#8217;t just put them both at 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>There are two primary strategies for parceling up your Web space. You can create&nbsp;<strong>subdomains<\/strong>&nbsp;or&nbsp;<strong>subdirectories<\/strong>. But before you can understand the difference, you need to first understand what we mean when we talk about your&nbsp;<strong>root<\/strong>&nbsp;domain.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"root-domain\">Root Domain<\/h4>\n\n\n\n<p>Let&#8217;s say you&#8217;ve registered a new domain for knight.domains called blog.knight.domains. Anything that is stored at this core\u00a0URL\u00a0is considered to be at the\u00a0<strong>root<\/strong>\u00a0of 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&#8217;s root. To get to your site in this scenario, users would simply go to blog.knight.domains.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"subdomains\">Subdomains<\/h4>\n\n\n\n<p>When you want to do more than just have a single site at the root of your site, you need to decide now to organize your space. One way to do so is by <a href=\"https:\/\/knight.domains\/support\/setting-up-subdomains\/\">setting up\u00a0<strong>subdomains<\/strong><\/a>.<\/p>\n\n\n\n<p>You&#8217;re may already be familiar with the concept of subdomains, even if you don&#8217;t know it. Consider Google&#8217;s website at <a href=\"https:\/\/google.com\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/google.com<\/a>. As you browse features of that site, you\u2019ll notice that the domain changes. When you\u2019re looking at your Gmail account, for example, the domain changes to <a href=\"https:\/\/mail.google.com\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/mail.google.com<\/a>. Now the root of the url is mail.google.com, indicating that you\u2019re on the part of the site that is dedicated to Google&#8217;s mail services.<\/p>\n\n\n\n<p>In this instance, mail.google.com is a subdomain that provides a different utility than google.com. 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>As you work on your site, you&#8217;re welcome to create as many subdomains as you like, and in each subdomain you can actually create a distinct, individual Web site.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"subdirectories\">Subdirectories<\/h4>\n\n\n\n<p>The alternative for organizing your space is to simply set up subdirectories. These function much like file folders on your computer. Instead of creating a blog at&nbsp;<strong>blog.yourdomain.com<\/strong>&nbsp;you would place it in a subdirectory called \u201cblog\u201d making the address&nbsp;<strong>yourdomain.com\/blog<\/strong>. Setting up subdirectory is really easy. You can create folders on the fly when installing applications (like WordPress), and you can also manually create them in your file browser.<\/p>\n\n\n\n<p>There is one particular issue you need to be aware of: Let&#8217;s say you&#8217;ve installed WordPress to be your primary blog at&nbsp;<strong>yourdomain.com<\/strong>. Later, you decide you want to install WordPress again for a separate image gallery site, and you want to place it at&nbsp;<strong>yourdomain.com\/gallery<\/strong>. But, if for some reason you&#8217;ve already created a page on your WordPress site called \u201cGallery\u201d then the url&nbsp;<strong>yourdomain.com\/gallery<\/strong>&nbsp;will already be taken. If you try to create a subdirectory of the same name, you&#8217;ll get a conflict and errors.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"tips-review\">Tips &amp; Review<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Subdomains<\/strong>&nbsp;are generally a cleaner, more elegant solution to organizing your site. You&#8217;re 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>Subdirectories<\/strong>&nbsp;don&#8217;t create as pretty URLs as subdomains, but they&#8217;re easier to set up. They can, however, result in conflicts with existing Web pages.<\/li><li>As soon as you create subdomains or subdirectories to organize your site, you need to consider how people are going to find them. If you&#8217;ve created a new primary blog at&nbsp;<strong>blog.yourdomain.com<\/strong>, and someone goes to just&nbsp;<strong>yourdomain.com<\/strong>, they won&#8217;t see that new site. It is possible to set up&nbsp;<strong>redirects&nbsp;<\/strong>to avoid this issue. You can also always create links from pages on one subdomain of your site to another.<\/li><li>If you really just need one site, sometimes installing at the root of your domain is the easiest thing to do, at least as you&#8217;re getting started. You can always add more pieces to your territory later with either subdomains or subdirectories.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"tutorials\">Tutorials<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/knight.domains\/support\/setting-up-subdomains\/\">Setting Up Subdomains<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>When you&#8217;re first getting started with a new space on a new Web host, you might think of yourself as owning a small \u201cterritory\u201d of the Web. Everything you place in your public folder on the server becomes available for anyone on the Web to see (assuming they know the address of your site and&hellip;&nbsp;<a href=\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Subdomains vs. Subdirectories<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-420","post","type-post","status-publish","format-standard","hentry","category-understanding-your-dashboard"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Subdomains vs. Subdirectories - Knight Domains Support<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Subdomains vs. Subdirectories - Knight Domains Support\" \/>\n<meta property=\"og:description\" content=\"When you&#8217;re first getting started with a new space on a new Web host, you might think of yourself as owning a small \u201cterritory\u201d of the Web. Everything you place in your public folder on the server becomes available for anyone on the Web to see (assuming they know the address of your site and&hellip;&nbsp;Read More &raquo;Subdomains vs. Subdirectories\" \/>\n<meta property=\"og:url\" content=\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/\" \/>\n<meta property=\"og:site_name\" content=\"Knight Domains Support\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-23T11:41:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-15T20:03:52+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/knight.domains\/support\/#\/schema\/person\/97fce710c22c2ab77084638feca7a7b3\"},\"headline\":\"Subdomains vs. Subdirectories\",\"datePublished\":\"2020-05-23T11:41:25+00:00\",\"dateModified\":\"2022-07-15T20:03:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/\"},\"wordCount\":954,\"publisher\":{\"@id\":\"https:\/\/knight.domains\/support\/#organization\"},\"articleSection\":[\"Understanding Your Dashboard\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/\",\"url\":\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/\",\"name\":\"Subdomains vs. Subdirectories - Knight Domains Support\",\"isPartOf\":{\"@id\":\"https:\/\/knight.domains\/support\/#website\"},\"datePublished\":\"2020-05-23T11:41:25+00:00\",\"dateModified\":\"2022-07-15T20:03:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/knight.domains\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Subdomains vs. Subdirectories\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/knight.domains\/support\/#website\",\"url\":\"https:\/\/knight.domains\/support\/\",\"name\":\"Knight Domains Support\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/knight.domains\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/knight.domains\/support\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/knight.domains\/support\/#organization\",\"name\":\"Knight Domains Support\",\"url\":\"https:\/\/knight.domains\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/knight.domains\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/knight.domains\/support\/wp-content\/uploads\/2020\/08\/cropped-norbyKDC_noText.png\",\"contentUrl\":\"https:\/\/knight.domains\/support\/wp-content\/uploads\/2020\/08\/cropped-norbyKDC_noText.png\",\"width\":1200,\"height\":950,\"caption\":\"Knight Domains Support\"},\"image\":{\"@id\":\"https:\/\/knight.domains\/support\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/knight.domains\/support\/#\/schema\/person\/97fce710c22c2ab77084638feca7a7b3\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/knight.domains\/support\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/14485561fe5f6aa0e0fa6f4fec288e998230a44741f270a510ea9621f2d9cfb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/14485561fe5f6aa0e0fa6f4fec288e998230a44741f270a510ea9621f2d9cfb6?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/knight.domains\/support\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Subdomains vs. Subdirectories - Knight Domains Support","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/","og_locale":"en_US","og_type":"article","og_title":"Subdomains vs. Subdirectories - Knight Domains Support","og_description":"When you&#8217;re first getting started with a new space on a new Web host, you might think of yourself as owning a small \u201cterritory\u201d of the Web. Everything you place in your public folder on the server becomes available for anyone on the Web to see (assuming they know the address of your site and&hellip;&nbsp;Read More &raquo;Subdomains vs. Subdirectories","og_url":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/","og_site_name":"Knight Domains Support","article_published_time":"2020-05-23T11:41:25+00:00","article_modified_time":"2022-07-15T20:03:52+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/#article","isPartOf":{"@id":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/"},"author":{"name":"admin","@id":"https:\/\/knight.domains\/support\/#\/schema\/person\/97fce710c22c2ab77084638feca7a7b3"},"headline":"Subdomains vs. Subdirectories","datePublished":"2020-05-23T11:41:25+00:00","dateModified":"2022-07-15T20:03:52+00:00","mainEntityOfPage":{"@id":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/"},"wordCount":954,"publisher":{"@id":"https:\/\/knight.domains\/support\/#organization"},"articleSection":["Understanding Your Dashboard"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/","url":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/","name":"Subdomains vs. Subdirectories - Knight Domains Support","isPartOf":{"@id":"https:\/\/knight.domains\/support\/#website"},"datePublished":"2020-05-23T11:41:25+00:00","dateModified":"2022-07-15T20:03:52+00:00","breadcrumb":{"@id":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/knight.domains\/support\/subdomains-vs-subdirectories\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/knight.domains\/support\/"},{"@type":"ListItem","position":2,"name":"Subdomains vs. Subdirectories"}]},{"@type":"WebSite","@id":"https:\/\/knight.domains\/support\/#website","url":"https:\/\/knight.domains\/support\/","name":"Knight Domains Support","description":"","publisher":{"@id":"https:\/\/knight.domains\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/knight.domains\/support\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/knight.domains\/support\/#organization","name":"Knight Domains Support","url":"https:\/\/knight.domains\/support\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/knight.domains\/support\/#\/schema\/logo\/image\/","url":"https:\/\/knight.domains\/support\/wp-content\/uploads\/2020\/08\/cropped-norbyKDC_noText.png","contentUrl":"https:\/\/knight.domains\/support\/wp-content\/uploads\/2020\/08\/cropped-norbyKDC_noText.png","width":1200,"height":950,"caption":"Knight Domains Support"},"image":{"@id":"https:\/\/knight.domains\/support\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/knight.domains\/support\/#\/schema\/person\/97fce710c22c2ab77084638feca7a7b3","name":"admin","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/knight.domains\/support\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/14485561fe5f6aa0e0fa6f4fec288e998230a44741f270a510ea9621f2d9cfb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/14485561fe5f6aa0e0fa6f4fec288e998230a44741f270a510ea9621f2d9cfb6?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/knight.domains\/support\/author\/admin\/"}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"admin","author_link":"https:\/\/knight.domains\/support\/author\/admin\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/knight.domains\/support\/category\/understanding-your-dashboard\/\" rel=\"category tag\">Understanding Your Dashboard<\/a>","rttpg_excerpt":"When you&#8217;re first getting started with a new space on a new Web host, you might think of yourself as owning a small \u201cterritory\u201d of the Web. Everything you place in your public folder on the server becomes available for anyone on the Web to see (assuming they know the address of your site and&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/posts\/420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/comments?post=420"}],"version-history":[{"count":2,"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/posts\/420\/revisions"}],"predecessor-version":[{"id":1501,"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/posts\/420\/revisions\/1501"}],"wp:attachment":[{"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/media?parent=420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/categories?post=420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/knight.domains\/support\/wp-json\/wp\/v2\/tags?post=420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}