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

Generate WordPress htaccess file in a few clicks

Set https & 301 permanent wordpress htaccess. it's very important for SEO! 

How to Use WordPress htaccess file Generator

1. Select redirect type

  • Redirect from non-www to www

2. Enter your domain name

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

3. Get your code

    Example code for "Redirect from www to non-www"

        RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]

4. Copy the code to your .htaccess file

Make sure to add the code on top of other rules in wordpress htaccess file