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

What is .HTaccess File?

.htaccess files on Apache servers allow you to make configuration changes even if you haven't had access to the core server configuration files.

.htaccess is shorthand for Hyper Text access.

.htaccess uses the same syntax as the root configuration, so you can use any rulings that you would normally add to the core server configuration files.

However, Apache's official documentation cautions using .htaccess files only when absolutely required, as they can slow down your core server's performance. Nonetheless, you can use other redirect methods, such as your server's main configuration file, JavaScript, PHP, or HTML, if it makes sense for your site.

If you use WordPress, you can use plugins like Redirection to redirect pages without having to remember much about the matter.

What’s the Use of .HTaccess File?

There are different uses for the htaccess file, including:

  • Set up redirects
  • Error handling
  • Bad robots and IP address blockage
  • Password protection

Keep in mind that htaccess is just a file extension; the actual file name on your server will be .htaccess. You might need to enable the view all hidden files option in order to unhide the file because many server and FTP software conceal the extensions.

How to Use this .HTaccess Redirect Generator?

On bestSEOtool.pro, the .htaccess redirect generator tool is available to perform redirects from non-www to www or from www to non-www.

All you need to do to have the tool generate the code for your website's .htaccess file is choose the type of redirect you want, type in your domain name, and then click "Get .htaccess Code" to see the code in the results box.

The code is now ready to be copied from this page and put into your website’s .htaccess file.