Redirection Plugin Not Working for HTML Pages

Today I want to focus on a very simple problem that’s pretty easy to solve. This problem occurs when using the Redirection plugin for WordPress and attempting to redirect .html or .htm pages and having it not work. This could also apply to any instance of a static page ending in .php, .txt, .zip, or whatever else you might have. This is quite a bit different than an issue you might have where your .htaccess file never works with WordPress, but it can still be confusing if you don’t understand what’s happening.

Symptom

You set up your redirection rule in the Redirection plugin to send visitors to a specific .html file to a new location. However, when you go to visit that page, instead of being redirected, you see the content of that old page! This is no good.

Solution

The solution is extremely simple. You see, for a regular redirection rule to function, it is a requirement that an actual, physical file does not exist at that exact location. You will need to delete the file that exists there.

For instance, let’s say you have a file, located at example.com/about.html. You want to redirect that to your home page. If, on your server, you still have a file in the site root called about.html, your redirect will not work until you delete that file. It’s as simple as that!

Easy stuff. It might not be obvious that you need to delete the file until you’ve read this, but hopefully now you won’t have any problems.

About Brian Johnson

Brian Johnson is a website developer and designer living in Minneapolis, Minnesota with a passion for code and WordPress. He spends his days building WordPress websites for small businesses, developing new code with the online community, and living life.

5 Comments on “Redirection Plugin Not Working for HTML Pages”

  1. Thank you! Very helpful.
    It should have been obvious to me but it wasn’t. Duh.
    I appreciate you posting this.

Leave a Reply

Your email address will not be published. Required fields are marked *