Simple 301 Redirect Added to Default WordPress .htaccess File

Simple 301 Redirect Added to Default WordPress .htaccess File

Highlighted in blue is a simple 301 redirect added to the top of a default WordPress .htaccess file.

RewriteEngine On
Redirect 301 /old-page.htm
Redirect 301 /another-old-page.htm

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

After adding your 301 redirect rules upload the .htaccess file to the root of your site using an FTP program like Filezilla.

.htaccess Simple 301 Redirect

Below is a simple 301 redirect that would be added to the .htaccess file found in the root of your site.

RewriteEngine On
Redirect 301 /old-page.htm

“RewriteEngine On” probably won’t be needed, it’s already been added by WordPress when you turn SEO friendly permalinks on. For non WordPress users the above is all you need within your .htaccess file to redirect one page to another.

If I added the above rule to this sites .htaccess file it would redirect to

If I added the rule to another site for example it would redirect to

This 301 redirect rule type can be used to redirect entire sites one page at a time, this is not the easiest way to redirect a site you’ve moved, but it’s possible.

Continue Reading WordPress 301 Redirects Tutorial