HTACCESS stands for Hypertext Access. It is a directory-level configuration file used on Apache web servers.
By customizing the htaccess file, you can get the most out of your website’s functionality and can improve your search engine rankings through search engine optimization (SEO).
There are two common ways to access your .htaccess file :
1. File Manager : Login to your hosting account to access and modify your files. You can do this by using your web based File Manager.
2. FTP (File Transfer Protocol) : You can access through an FTP client software. I prefer Filezilla.
Browse to the root of your publicly viewable folder. This is mostly named as public_html or www. In this folder only your homepage located.
If you are already familiar with .htaccess, you can try these :
1. How To Create 301 URL Redirection?
How to Create A HTACESS file :
In some cases you won’t have an .htaccess file in that folder. You don’t need to worry for it. Creating a .htaccess is far simple.
1. Open Notepad or any other editor
2. Type the required code
3. Save it with an extension .htaccess
Note :
- There should be no text before the period. It has to be exactly “.htaccess”.
- It can also be saved without anything in it. HTACCESS file can also be a blank file.
Correct Permissions :
It is very important that your .htaccess file have the correct permissions for preventing others from modifying the file and take full control of your website/blog.
The permissions should be set at 644, rw-r-r. You can check the permissions by right clicking on the file and choosing permissions or CHMOD with the help of FTP Client Software.
Now you have created your .htaccess file. Watch out some worthy tutorials in upcoming posts to make your blog/website secure !
I was not knowing the use of .htaccess file.. How to learn more about this file in deep? I just know that we should not do any thing wrong in this file but why?
thanks for the tip, but when i tried to edit an htaccess and saved , my site coladesed, ” error in directory list ” 🙁 @ first time, so i never touch the htaccess | but i know its very powerful though 8)
Ok sorry , I just forgotten that you already posted an article on this topic, good one. Thanks.
This is really very useful article Pradeep, I advice you to give one article on How to redirect URL using .Htaccess method.
Hi Pradeep,
Sunil again. I usually don’t take time to look at other’s blogs because of time constraint. But some how, your posting are irresistible to stop opening your useful articles to the beginners like me.
I came from your recent article “Remove WWW From The Blog’s URL Automatically”. Thanks for choosing useful content to many bloggers.
Can you please tell me when does a comment goes in spam folder. I got this doubt when I read your reply to Sarang Dravid comment. Do you have (webmaster) have facility to specify spamming rules to comments? Just hint to the answer would be appreciated.
Thank you.
Sunil.
.htaccess file also helps when your script or CMS forces you to put a full read, write and execute (777) permissions on the folders. These folders can easily be manipulated by anyone, therefore, you can create a .htaccess in the directory level and create a Order Allow, Deny (or Order Deny, Allow) directives to prevent unauthorized access to your folder/sub folders.
Great tip, Mr. Pradeep Kumar 🙂
how it can help in SEO, I couldn't understand it….
Really nice info for beginners.You can also upload a blank *.txt file via your FTP client and then rename it to .htaccess
Hi Pradeep, its a real gud article for the beginners… 🙂 , long time back,i blogged one article about some of power tips and tricks for .htacess .. May be you and your readers will love to take a look over it .. http://www.itechnobuzz.com/tips-and-tricks/htaccess-tricks-and-hacks-every-webmaster-must-know/ .. and yup don’t take it as a spam unless you tk a look for its worth!! ^_^
Very good information.
It will be helpful for those who don’t know about it.
I always careful with .htaccess. It’s important for your site’s safety =)