• WordPress SEO Optimization Techniques Subscribe to RSS
    • Blog
    • Archives
    • Directory
    • WordPress SEO
    • WordPress Themes
      • Blog > Webmaster World > .htaccess Tutorial – How to Create a .htaccess file
        • .htaccess Tutorial – How to Create a .htaccess file

        • How to create a htaccess fileThe purpose of this .htaccess tutorial is to learn how to create a .htaccess file and to give you a better understanding of its capabilities and functions. In this tutorial, we will cover how to create a .htaccess file from scratch and upload it on your server via FTP. The whole process is very easy to do and only takes about ten minutes or less, depending on your knowledge and skill set.

          - - Let's take a moment and look at some of the things we can do with the .htaccess file - -

          * Prevention of hot-linking images. This is where someone links to an image from your site. This saves them bandwidth, but costs are passed on to you if you are paying for bandwidth.
          * Blocking bad bots.
          * Password protect website directories.
          * Prevent people from browsing through a particular folder.
          * Prevent viewing of the .htaccess file.
          * Change the default index page of your site or a folder.
          * Redirect visitors automatically from one page to another or to another website.
          * Ban users by their IP address
          * The use of custom 404 error pages

          The .htaccess file is a text file, consisting of an eight letter file extension without a file name. It contains Apache directives which allow you to make very important configuration changes on Linux and Unix servers running the Apache Web Server on a per-directory basis. Once the .htaccess file is placed in a particular directory, those directives will apply to the documents in the directory and all sub-directories as well.

          - - Creating a .htaccess file the easy way, simply follow these steps - -

          * Open your Windows notepad editor.

          open-windows-notepad

          * Make sure that the word wrap function is off.

          open-windows-notepad-no-wordwrap

          * Select File, then select New

          open-windows-notepad-new

          * You should have a screen that doesn't contain any text.
          windows-notepad-without-text1
          * Next, select Save As
          windows-notepad-save-as1
          * Type the following for your file name, .htaccess

          windows-notepad-save-as-htaccess

          * Browse your folders and select which folder you want to save the .htaccess file in, then click Save

          The next step is to verify that the file was named .htaccess by the editor. You simply open the Windows file manager, locate the file, right-click the file icon and selecting Properties.) If the file was named with the .txt suffix, you can rename the file to .htaccess and your done with the verification process.

          You now need to upload the .htaccess file into your site in ASCII mode.

          - - Setting up a FTP connection to your website - -
          To set up a FTP connection you will need to use what is known as a FTP client. Two good examples of FTP clients are http://www.cuteftp.com (paid) and http://filezilla-project.org (free)

          After you are done installing a FTP client, it’s time you set up a connection using it. When you signed up with your webhost you should have received details like an FTP Address, a username and a password from them. Your webhost may have provided you with more details like the URL to access your Control Panel software. I’ll cover more on this in a different section of the guide.

          To set up the connection, launch the FTP application that you had installed and find the option that lets you create a new connection. You will now see a window in which you need to specify the details that are required to set up a connection. These details include assigning a name to your connection, specifying the FTP or Host Address and entering the username and password. Your client might also ask you which protocol you want to use, in most cases the answer would be FTP which is the standard protocol for transferring files over a network. If it asks what transfer type you want to use, select Auto Detect. You are done setting up the connection, and you can now try connecting to your site for the first time. If you have followed everything correctly, you should be successfully connected to your host.

          You may need to CHMOD the .htaccess file to 644, which makes the file usable by the server.

          - - Additional Notes - -
          * If you are hosting on a Windows-based server, you cannot use the .htaccess file.
          * If you WordPress is installed in the root, then you need to upload the .htaccess file to the root. If your WordPress is installed in a sub folder like "blog", you will need to upload it into the appropriate folder.

          Hope this blog post was helpful to you, ".htaccess Tutorial - How to Create a .htaccess file"  Be sure to share this post with your friends on Twitter. Furthermore, I appreciate your time that you have spent here!

          Spunky Jones.

          If You Enjoyed, Please Share:
          • Digg
          • del.icio.us
          • StumbleUpon
          • Technorati
          • NewsVine
          • Reddit
          • Twitter
          • Facebook
          Related Posts:
          1. Tracking your website PHP Errors, via the .htaccess file
          2. 404 File Not Found Error Page!
          3. Is it better to have a shared IP or dedicated IP address?
          4. Protecting Your Email Address from Bots and Spammers!
          5. Selecting Your Web Hosting Provider
          6. Search Engine Submission – Putting Myths to Rest!
          7. How to Improve Your Alexa Ranking
          8. Achieving An Authority Website Status
          9. How to get that new site indexed fast by Google!
          10. Improving Alexa Ranking with Google Image Search
          Top Incoming Search Queries:
        • Posted on 2nd May 2009 by Spunky Jones in Webmaster World
      • Google Custom Search
      • Navigation

        • About
        • Blog Archives
        • Contact
        • List of Blog Authors
        • Privacy Policy
        • Upcoming Scheduled Posts
        • WordPress SEO
      • Popular Posts

        • Adjusting Your Monitor's Brightness...
        • Protecting Your Email Address from Bots...
        • How to Combat Spam with the Akismet...
        • How to Remove, "Comments are Closed"...
        • Robots.txt for WordPress SEO
        • How to get that new site indexed fast...
        • Introducing our newest plugin for...
        • Breaking SEO Strategy Down into Three...
        • Strong Tag versus Bold Tag for SEO
        • Release the idle processes on Windows...
      • Category Topics

        • Blogging
        • Business World
        • Making Money Online
        • Ramblings
        • SEO
        • Social Networking
        • Technology
        • Web Directories
        • Webmaster World
        • WordPress
        • WordPress SEO Optimization
      • Spunky has Faster Loading Speeds

        Many of you are noticing faster loading speeds on Spunky Jones. This is due to a little tweaking and changing over to Gotekky for my web hosting provider.
      • WordPress Plugins

      • Directory Submissions

        Madmouse Web Directory - US
        Deep Link Listing Directory
        Madmouse Link Directory - India
      • Free SEO Tools

        • Canonical Duplicate Fixer
        • META Language Tag Generator
  • Copyright © 2008 - 2010 Spunky Jones: WordPress SEO Optimization Techniques
    Designed by: Spunky Jones | Coded by: PSD to HTML