Uncategorized

Easy tweaks to speed up your blog with htaccess

Today am go gonna let you know few trick about .htacess which can speed up your blog or website and it will also improve your SEO. If you are using VPS for your particular blog then that will be rock after these tweaks with your apache server.

How to create a .htaccess file?

I have seen that many people on the internet asking about this but seriously its damn easy because it’s a normal text file start with dot :D. Well you all need to do Open note pad and put commands on it save it named as .htaccess, but always make sure you select All Files in Save as type while saving.

Enable GZIP compression: You could compress about 60% file size, suppose your home page size is about 100KB then GZIP will convert it to about 30KB as result your blog will load 3 times faster than before.

Add this code in your .htaccess file to enable for your blog


“# compress text, html, javascript, css, xml:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript”

 

Enable Page Cache: Whenever any of your visitor load your website or blog that time browser download all basic files of your website in his computer. And if you visitor return to your website again browser will load files of your website from his own computer’s cache instead of re-downloading from your web hosting server.

In this case you can define time of your website cache by adding bellow code in your .htaccess file..


<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault A300

# Expires after 1 month
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType application/pdf A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/plain A2592000

# Expires after 1 day
ExpiresByType text/css A86400
</ifModule>

About the author

Rajesh Chauhan

GoogieHost is one of the leading free web hosting provider on the internet over 300000 satisfied clients across the globe. We also offer Affordable SEO Web Hosting and Digital Marketing service to give give wings to your online business. Unlimited FREE HOSTING.

Hey! leave comment to ask your queries about this topic.

Powered by GoogieHost