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 https://seo-gold.com/new-page/
Redirect 301 /another-old-page.htm https://seo-gold.com/new-page-2/

# 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]
</IfModule>

# 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 https://seo-gold.com/new-page/

“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

https://seo-gold.com/old-page.htm to https://seo-gold.com/new-page/

If I added the rule to another site for example https://example.com/ it would redirect

https://example.com/old-page.htm to https://seo-gold.com/new-page/

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 Redirect