.Htaccess file is magic ingredient. When you know how to handle this, you will find it essential and beneficial for your website. Watch out, you have to be careful with this one because it will ruin your site if you don’t do it right!


What is a .htaccess file??

Go to your cPanel file manager and you will find generic file titled .htaccess in format txt. The .htaccess file is small and powerful generic file that control various aspect of how your webpages display content. By putting additional working code, you can manage redirection, enable compression, rewrite URL, leveraging compression mode and more.


Also Read: 7 Ways to Dramatically Increase Your Twitter Follower


How do I find my .htaccess file?

By default, .htaccess is a hidden. Though, you can find this easily by checking box ‘show hidden file’ when you go to File Manager through your cPanel. The .htaccess usually located on the ‘root’ level or ‘www’ folder. Every folder where you put your files to be displayed on the web, normally contains one.htaccess file.


 .htaccess, default, wordpress


Default .htaccess for WordPress Self Hosting should be like this:

# BEGIN WordPress


<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]



# END WordPress


Caution: Remember to do back up before and each time you have done alteration on .htaccess. It’s advised to review your web display the minute after doing editing on your .htaccess too. Once you do wrong with this file, it cause trouble for your website. It could make a mess or your website doesn’t show up entirely.


Also Read: Best Twitter and Instagram Sharing Plugin for WordPress


What to do when .htaccess file error?

If you find your site look trouble and doesn’t display or something else after you edit .htaccess, the best to retrieve this file to default or previous version you saved before error. It’s important to save and refresh after editing to prevent this problem. It’s like double job indeed, but it’s much better than losing your site for trouble might happen. If you don’t anticipate this, more work will stress you.