htaccess generator.png

If you’re a webmaster that is running a site using Apache then you are likely familiar with the .htaccess file. It’s a powerful way to redirect and control access to virtually any page on the site, but it can take time getting used to the syntax needed for some of the things you may want to do. One thing that comes to mind is setting up a domain (ex. to redirect to the www version of the site (ex.

This online .htaccess redirect creator makes doing this kind of stuff easy. As you can see in the screenshot above you’ll just have to fill out a simple form to get started and you only have to select the options that you want to activate. It will then generate the .htaccess file that you can use to update your site.

Here’s some of the things you can customize:

  • Redirecting to the www version of a domain
  • Creating 301 redirects for a specific file or directory
  • Enable client-side caching
  • Password protecting a file
  • Hotlinking protection based on filetype
  • Custom 400, 401, 403, 404, or 500 error pages
  • Block users by IP address
  • Block known bad bots
  • Change default directory page
  • Prevent viewing of the .htaccess file
  • Prevent directory listing

Out of all the options available I thought the “block bad bots” feature was the most interesting. Checking that box will automatically create a long set of rules that will prevent useless crawlers from being able to hit your site based on the user agent they are coming from. If you’re already running an underpowered server this may help save some of your resources for legitimate crawlers and visitors.

.htaccess Redirect Homepage