Htaccess Redirect Generator


1. Select redirect type





2. Enter your domain name


Do not include www. Domain name only - e.g. yourdomain.com

3. Get your code


4. Copy the code to your .htaccess file



About Htaccess Redirect Generator

A website that runs on Apache Web Server Software has a .htaccess configuration file places on them.  .htaccess is an abbreviation for hypertext access. This file when placed on the Apache web server, It will identify and execute the commands that are in the file. This is a multi-purpose file and it can be used for many things. Some of the things are described below

  • Changing the settings of Apache web server.
  • Enabling or disabling some of the functionalities of the server and its features.
  • Handling redirects to a website.
  • To protect passwords.
  • To block any users who belong to certain IP range or an IP address.
  • To redirect visitors to another webpage.

There are many more additional features that this htaccess file can be used for. .htaccess is the name without an extension. If you try to change the name of the file, Then the system will not detect it as a file. Similarly, if you try to change the extension of the file, The system will fail to recognize it. If you have used some CMS like WordPress, Joomla or Drupal then you might have encountered this file or even have worked on this. Some hosting providers allow you to edit the file but there are also some that don't allow you to edit. However, you can always create your own and upload it to specific directories.

How to create the .htaccess file?

Creation of a .htaccess file is very simple. Anyone can create it. ALl you need is a good text editor. However, it still works with notepad. You can do all the work from just notepad file. You can redirect the users, protect files with password, block visitors with this file. To create one, First, open notepad on your desktop computer. Once in notepad, Enter the programs that you want to run in the .htaccess file. When done with the programming stuff, Click on "File" from the top menu bar and then click on "Save As" button. A popup box will open. Here you have to enter the name as ".htaccess" and below that change, the file type to "All Files" and then hit on the save button. The file is now saved on your desktop.

To transfer the file from your computer to your server hosting you can either use file manager inbuild in a panel or you could use FTP software like file zilla. Make sure to upload the file in the root directory.

Why use our .htaccess redirect Generator?

Our .htaccess allows you to generate a redirect code for your website. The tool will help you generate redirection code from www to non-www website. This tool is easy to use. To use the tool, You just have to enter the website which you want to redirect from www to non-www. Then click on generate button. The tool will generate the code for you. You can also generate code to redirect your non-www website to www website. By default, the first option is selected by the tool.