{"id":197,"date":"2016-10-20T16:27:05","date_gmt":"2016-10-20T16:27:05","guid":{"rendered":"http:\/\/jamesdowen.com\/blog\/?p=197"},"modified":"2017-01-30T23:22:43","modified_gmt":"2017-01-30T23:22:43","slug":"how-to-speed-up-your-website-with-htaccess","status":"publish","type":"post","link":"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/","title":{"rendered":"How to speed up your website with .htaccess"},"content":{"rendered":"<p>Loading speed is still a common issue for many websites from small to big today. If your website takes longer than 2 seconds to load, then it most people will leave your website and go elsewhere without a second thought &#8211; and will never again return to your website.<\/p>\n<p>There&#8217;s also another consequence to slow loading times, Google are now using loading times as a ranking factor on search results. So, if your competitors have faster loading times, then chances are there website could rank higher than yours in search engine results &#8211; potentially costing you a great amount of traffic. Below are some quick ways of increasing your loading times with .htaccess:<\/p>\n<pre class=\"lang:default decode:true \"># Enable GZIP compression\r\n&lt;IfModule mod_gzip.c&gt;\r\n    mod_gzip_on       Yes\r\n    mod_gzip_dechunk  Yes\r\n    mod_gzip_item_include file      \\.(html?|txt|css|js|php|pl)$\r\n    mod_gzip_item_include handler   ^cgi-script$\r\n    mod_gzip_item_include mime      ^text\/.*\r\n    mod_gzip_item_include mime      ^application\/x-javascript.*\r\n    mod_gzip_item_exclude mime      ^image\/.*\r\n    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*\r\n&lt;\/IfModule&gt;\r\n\r\n# mod_deflate\r\nAddOutputFilterByType DEFLATE text\/html text\/plain text\/xml text\/css text\/javascript application\/javascript\r\n\r\n# enable keep-alive\r\n&lt;ifModule mod_headers.c&gt;\r\n    Header set Connection keep-alive\r\n&lt;\/ifModule&gt;\r\n\r\n<\/pre>\n<p>If you&#8217;d like help doing this on your own website, then please do <a href=\"http:\/\/jamesdowen.com\/#contact\">contact me.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Loading speed is still a common issue for many websites from small to big today. If your website takes longer than 2 seconds to load, then it most people will leave your website and go elsewhere without a second thought &#8211; and will never again return to your website. There&#8217;s also another consequence to slow [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[96,67,95,97],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to speed up your website with .htaccess | James Dowen<\/title>\n<meta name=\"description\" content=\"Learn how to easily increase your websites loading time and speed with .htaccess.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to speed up your website with .htaccess | James Dowen\" \/>\n<meta property=\"og:description\" content=\"Learn how to easily increase your websites loading time and speed with .htaccess.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/\" \/>\n<meta property=\"og:site_name\" content=\"James Dowen\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-20T16:27:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-01-30T23:22:43+00:00\" \/>\n<meta name=\"author\" content=\"James\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/\",\"url\":\"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/\",\"name\":\"How to speed up your website with .htaccess | James Dowen\",\"isPartOf\":{\"@id\":\"https:\/\/jamesdowen.com\/blog\/#website\"},\"datePublished\":\"2016-10-20T16:27:05+00:00\",\"dateModified\":\"2017-01-30T23:22:43+00:00\",\"author\":{\"@id\":\"https:\/\/jamesdowen.com\/blog\/#\/schema\/person\/51179280d7d76166490e1c27be360931\"},\"description\":\"Learn how to easily increase your websites loading time and speed with .htaccess.\",\"breadcrumb\":{\"@id\":\"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jamesdowen.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to speed up your website with .htaccess\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jamesdowen.com\/blog\/#website\",\"url\":\"https:\/\/jamesdowen.com\/blog\/\",\"name\":\"James Dowen\",\"description\":\"A blog about web development.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jamesdowen.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/jamesdowen.com\/blog\/#\/schema\/person\/51179280d7d76166490e1c27be360931\",\"name\":\"James\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jamesdowen.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e4d7008d9ebb77f8de729f655e30d11f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e4d7008d9ebb77f8de729f655e30d11f?s=96&d=mm&r=g\",\"caption\":\"James\"},\"sameAs\":[\"http:\/\/jamesdowen.com\"],\"url\":\"https:\/\/jamesdowen.com\/blog\/author\/jdowen\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to speed up your website with .htaccess | James Dowen","description":"Learn how to easily increase your websites loading time and speed with .htaccess.","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:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/","og_locale":"en_US","og_type":"article","og_title":"How to speed up your website with .htaccess | James Dowen","og_description":"Learn how to easily increase your websites loading time and speed with .htaccess.","og_url":"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/","og_site_name":"James Dowen","article_published_time":"2016-10-20T16:27:05+00:00","article_modified_time":"2017-01-30T23:22:43+00:00","author":"James","twitter_misc":{"Written by":"James","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/","url":"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/","name":"How to speed up your website with .htaccess | James Dowen","isPartOf":{"@id":"https:\/\/jamesdowen.com\/blog\/#website"},"datePublished":"2016-10-20T16:27:05+00:00","dateModified":"2017-01-30T23:22:43+00:00","author":{"@id":"https:\/\/jamesdowen.com\/blog\/#\/schema\/person\/51179280d7d76166490e1c27be360931"},"description":"Learn how to easily increase your websites loading time and speed with .htaccess.","breadcrumb":{"@id":"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jamesdowen.com\/blog\/how-to-speed-up-your-website-with-htaccess\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jamesdowen.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to speed up your website with .htaccess"}]},{"@type":"WebSite","@id":"https:\/\/jamesdowen.com\/blog\/#website","url":"https:\/\/jamesdowen.com\/blog\/","name":"James Dowen","description":"A blog about web development.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jamesdowen.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/jamesdowen.com\/blog\/#\/schema\/person\/51179280d7d76166490e1c27be360931","name":"James","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jamesdowen.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e4d7008d9ebb77f8de729f655e30d11f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e4d7008d9ebb77f8de729f655e30d11f?s=96&d=mm&r=g","caption":"James"},"sameAs":["http:\/\/jamesdowen.com"],"url":"https:\/\/jamesdowen.com\/blog\/author\/jdowen\/"}]}},"_links":{"self":[{"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/posts\/197"}],"collection":[{"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":2,"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":202,"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/posts\/197\/revisions\/202"}],"wp:attachment":[{"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jamesdowen.com\/blog\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}