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.
Chill buddy ! ๐
This is really very useful article Pradeep, I advice you to give one article on How to redirect URL using .Htaccess method.
Thanks Himanshu ! ๐
Many people were confused with .htaccess.. so I thought of making one ! ๐
And the post you asked was already published ๐ :
http://hellboundbloggers.com/2009/05/29/url-redirection/
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.
I think you are familiar with Spam section of your emails.. it is similar to blog only… but comment spam targets search engines…
A comment usually enters spam queue if it contains mysterious links, links with words like proxies, porn, or even maybe commonly entered spam comments etc…
My blog is protected by Akismet, when a new comment, trackback, or pingback comes it is first tested Akismet which runs hundreds of test on the comment.. and decides whether to approve or not…
Hope thi is helpful ! ๐
.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 ๐
Thanks for the additional info Richael !
And also for your first comment here ! ๐
how it can help in SEO, I couldn't understand it….
Buddy. It helps in many ways indeed ! ๐
1. Custom Error Page
2. Redirecting A URL
3. SEO-Friendly URLs
4. SSL https to http
I will try my best to cover all these in upcoming posts ! ๐
Really nice info for beginners.You can also upload a blank *.txt file via your FTP client and then rename it to .htaccess
Yeah ! ..
That also works ! Thanks for sharing mate ! ๐
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!! ^_^
You are lucky buddy ! It didn’t go to the Spam Folder ! I wonder how ?
Yeah ! I saw the hacks .. pretty cool.. will link it in my upcoming posts ! ๐
Cheers ! Thanks for your first comment here ! ๐
Very good information.
It will be helpful for those who don’t know about it.
Thanks mate ! ๐
I’m taking these things seriously now..
I always careful with .htaccess. It’s important for your site’s safety =)
Yeah ! I used to ignore about .htaccess when I started this blog. But now I’m dead serious about it… ! ๐