{"id":2616,"date":"2013-04-17T17:43:15","date_gmt":"2013-04-17T17:43:15","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2013\/04\/17\/best-practice-for-naming-files-in-linux\/"},"modified":"2024-09-05T17:15:13","modified_gmt":"2024-09-05T21:15:13","slug":"best-practice-for-naming-files-in-linux","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/","title":{"rendered":"Best practice for naming files in Linux"},"content":{"rendered":"<p>If you are developing your website and you cannot find out why your pages, images, JavaScripts, and other web data is causing a <a href=\"\/support\/website\/error-numbers\/404-error-page-not-found\/\" target=\"_blank\" rel=\"noopener\">404 error not found<\/a>, you may have a problem with case sensitivity.<\/p>\n<p>Linux servers are case sensitive. Windows servers are not case sensitive, so if you are moving your files from a Windows development platform to a Linux web platform you may need to watch out for the following common mistakes.<\/p>\n<h2>Common Case Sensitive errors<\/h2>\n<h3>Mixing Upper case and lower case<\/h3>\n<p>A common mistake is naming files a mixture of upper case and lower case. Like the following:<\/p>\n<p style=\"margin-left: 20px;\">MyFileName.html<\/p>\n<p>Linux reads the file name exactly the way its typed. So,<\/p>\n<p style=\"margin-left: 20px;\">MyFileName.html<\/p>\n<p>Is NOT the same as:<\/p>\n<p style=\"margin-left: 20px;\">myfilename.html<\/p>\n<h3>Incorrect types file extension<\/h3>\n<p>File extensions are case sensitive as well. Some file types have 4 letters and others 3. See the following example:<\/p>\n<p>Likewise, file extensions need to be exact as well:<\/p>\n<p style=\"margin-left: 20px;\">MyFileName.HTML<\/p>\n<p>Is NOT the same as:<\/p>\n<p style=\"margin-left: 20px;\">myfilename.html<\/p>\n<p>Also, image extensions must be the right type:<\/p>\n<p style=\"margin-left: 20px;\">image.jpg<\/p>\n<p>Is NOT the same as:<\/p>\n<p style=\"margin-left: 20px;\">image.jpeg<\/p>\n<h2>Best practices for Linux file naming<\/h2>\n<p>To prevent running into problems with your file paths on your site, we recommend following the best practices for file naming. See the below:<\/p>\n<ol>\n<li>Name all your files lower case.<\/li>\n<li>Instead of using a space, use an ( _ ) or a ( &#8211; )<\/li>\n<li>Use consistent file types. Use jpg or jpeg. Don&#8217;t use both.<\/li>\n<li>Only alphanumeric characters, periods, underscores and hyphens and don&#8217;t use symbols like \u201c%\u201d, \u201c$\u201d, and so forth.<\/li>\n<li>Keep the file names short and descriptive.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>If you are developing your website and you cannot find out why your pages, images, JavaScripts, and other web data is causing a 404 error not found, you may have a problem with case sensitivity. Linux servers are case sensitive. Windows servers are not case sensitive, so if you are moving your files from a<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/\"> Read More ><\/a><\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4308],"tags":[],"class_list":["post-2616","post","type-post","status-publish","format-standard","hentry","category-linux"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Best practice for naming files in Linux | InMotion Hosting<\/title>\n<meta name=\"description\" content=\"You may notice your images, style sheets or other file not load when you upload them to your server. Its possible you have named the files not case sensitive This article will explain the best practice for naming files on Linux.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Best practice for naming files in Linux | InMotion Hosting\" \/>\n<meta property=\"og:description\" content=\"You may notice your images, style sheets or other file not load when you upload them to your server. Its possible you have named the files not case sensitive This article will explain the best practice for naming files on Linux.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-17T17:43:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-05T21:15:13+00:00\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0ba9f3ef6fadef71df5aa120ff996c41\"},\"headline\":\"Best practice for naming files in Linux\",\"datePublished\":\"2013-04-17T17:43:15+00:00\",\"dateModified\":\"2024-09-05T21:15:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/\"},\"wordCount\":267,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/\",\"name\":\"Best practice for naming files in Linux | InMotion Hosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"datePublished\":\"2013-04-17T17:43:15+00:00\",\"dateModified\":\"2024-09-05T21:15:13+00:00\",\"description\":\"You may notice your images, style sheets or other file not load when you upload them to your server. Its possible you have named the files not case sensitive This article will explain the best practice for naming files on Linux.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Best practice for naming files in Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0ba9f3ef6fadef71df5aa120ff996c41\",\"name\":\"InMotion Hosting Contributor\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/jamesr\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Best practice for naming files in Linux | InMotion Hosting","description":"You may notice your images, style sheets or other file not load when you upload them to your server. Its possible you have named the files not case sensitive This article will explain the best practice for naming files on Linux.","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:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/","og_locale":"en_US","og_type":"article","og_title":"Best practice for naming files in Linux | InMotion Hosting","og_description":"You may notice your images, style sheets or other file not load when you upload them to your server. Its possible you have named the files not case sensitive This article will explain the best practice for naming files on Linux.","og_url":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2013-04-17T17:43:15+00:00","article_modified_time":"2024-09-05T21:15:13+00:00","author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0ba9f3ef6fadef71df5aa120ff996c41"},"headline":"Best practice for naming files in Linux","datePublished":"2013-04-17T17:43:15+00:00","dateModified":"2024-09-05T21:15:13+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/"},"wordCount":267,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/","url":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/","name":"Best practice for naming files in Linux | InMotion Hosting","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2013-04-17T17:43:15+00:00","dateModified":"2024-09-05T21:15:13+00:00","description":"You may notice your images, style sheets or other file not load when you upload them to your server. Its possible you have named the files not case sensitive This article will explain the best practice for naming files on Linux.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/best-practice-for-naming-files-in-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"Best practice for naming files in Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0ba9f3ef6fadef71df5aa120ff996c41","name":"InMotion Hosting Contributor","url":"https:\/\/www.inmotionhosting.com\/support\/author\/jamesr\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":null,"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=2616"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2616\/revisions"}],"predecessor-version":[{"id":128670,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/2616\/revisions\/128670"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=2616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=2616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=2616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}