Htaccess Redirect Generator

On web servers running the Apache Web Server software the .htaccess configuration file can be placed. .htaccess is an abbreviation for Hyper Text access.

Select redirect type:

About .htaccess

On web servers running the Apache Web Server software, a .htaccess configuration file can be located. .htaccess stands for hypertext access. Once this file is located, the Apache web server will detect and execute the commands in this file. This file can be used to:

  • Modify Apache web server configuration
  • Enable/disable features and functionality
  • Manage redirects
  • Password protection
  • Deny map visitor access play by IP
  • Redirect visitors

There are other additional functions the .htaccess file can be encrypted to perform. The file name cannot be changed or added an extension. In case you change the name or save it with an extension and download; it will not be recognized. If you are already using a content management system like Drupal, Joomla, or WordPress, you may have encountered this file. You might as well have changed it. Some web hosts do not allow you to change it. But you can create your own file and upload it to specific folders.

How to create .htaccess file

You can create a .htaccess file with a good text editor such as TextPad, UltraEdit, and Microsoft WordPad. You cannot use Microsoft NotePad. You can enable password protection, redirect to a custom error page if the user cannot log in, or redirect to a custom page if the user encounters an error. A .htaccess file can contain one or more lines depending on the functionality you want to include in it. You will need to use an FTP (File Transfer Protocol) program to upload files. You must also upload files in "ASCII" mode. Some FTP programs use "BINARY" as default to upload files. If so, you need to change it to "ASCII". Upload the file to the folder where you want the file to reside. When you view the files in your website folder, you may not see it because your web server software may be hiding it.

Error Handling

The .htaccess file is useful for error handling. Visitors get annoyed when they get error messages like 401, 404, 500 messages on the website
This is where the .htaccess file can be used to display a visitor-friendly message in case they have trouble accessing your site.


The redirect allows webmasters to redirect visitors to your site from one page to another on the site. You can also redirect visitors to another website. It's a very useful tool when webmasters don't want visitors to see certain pages of a website.

Password Protection

This is perhaps the most important feature a webmaster might want to incorporate. They don't want anyone unauthorized to access and access the site. For example, you must have a valid username and password to access your email account. When protected by a password, users feel more secure when sharing information on this website. Even popular social media sites are password protected. To protect your site with a password, you will need to put instructions in your .htaccess file.

Deny visitors

Again, this feature can be integrated into your site using a .htaccess file. Some websites don't want visitors from certain IP addresses to access their website.

This feature is extremely useful to block unwanted visitors. Webmasters can choose which IP addresses to allow access to the website from and from which to block visitors. In most cases, webmasters allow visitors from a specific range of IP addresses and thus automatically block visitors from any other IP address. Government agencies and organizations use this feature to block unwanted visitors.

If you are experiencing some hits from an unknown website, you can block that site in case you think it is editing your CSS files. You can also deny access to the referrer.

.htaccess Redirect Generator

Putting all the commands a webmaster might want in a .htaccess file on a web server requires them to know the html code. Yes, commands executed by .htaccess files can be created with a text editor but cannot be set as tools.

To redirect from non-www to www or from www to non-www, the .htaccess tool is available on if you want the code generator to include .htaccess, navigate to from your search browser. On the website, scroll down to the .htaccess redirection generator icon and click it. It has two options;

  • Redirecting from www to non-www
  • Redirecting from non-www to www

The default option is the first choice. Enter your domain name and press the "Get Your Code" button. Having a captcha will require verification. Once you've done this, the generated code will be displayed in the results box. Now you can copy the code from here and paste it in your .htaccess file.

After successfully updating the .htaccess file, the redirect function will be performed. Website visitors will now be seamlessly redirected to another website,


The .htaccess file is an extremely useful tool for webmasters to take control of their website. They can issue friendly messages in the event of an error, incorporate password restrictions, redirect visitors, deny access from selected IP addresses, and more.
To provide all these features on an Apache based web server, a webmaster must be completely familiar with all the options and should know how to create htaccess files and how to use htaccess. Webmasters can get help from a developer or familiar with HTML code. Remember that any changes made to this file will have a direct impact on how the site behaves and meets the needs of its users. Therefore, you need to know what you are doing and how exactly to do it when making changes to your site's .htaccess file. Don't try to make changes if you're not familiar with the commands you can encode in .htaccess.


This is the one-stop for SEO tools and Web Tools. Star using these tools to increase the reach and ranking of your website on different search engines.