Replacing HTML Files with WordPress Pages Using 301 Redirects

WordPress Tips

While 301 redirects used to cause trouble for a page’s ranking and respect rating in search engines, most notably Google, in modern times the 301 redirect is handled as a wholly valid way to ensure a visitor gets to the right place. Because of that, this is an ideal way to handle link issues when you are in the process of replacing / moving old HTML files with new matching WordPress pages.

Let’s go through this step by step.

First, let’s review the situation (cue up the Oliver! soundtrack to sing along). Many websites began in the old days before WordPress even existed. Maybe a site was built in HTML because the owners didn’t trust WordPress. Who knows. For whatever reason, you now have a WordPress site set up but you also have some remaining legacy files that are still regular hard-coded HTML files. You want to be able to show and edit those in WordPress.

The old HTML files undoubtedly have names that end in .HTM or .HTML like this:

https://lisashea.com/workfromhome/office/basics.html

WordPress doesn’t use extensions. Their website URLs are simply words and slashes. You could use some trickery and plugins to rearrange WordPress to use those extensions, but we’re going to use a different technique. We’re going to let WordPress name things in its new, many would say “better” way. What we’re going to do is ensure that visitors coming in looking for that old file get redirected to the new and improved file in WordPress.

That’s what a 301 redirect does.

A 301 is like a traffic cop who knows that people have moved. He looks at incoming traffic and says, “You’re looking for page 123? It’s now over here. Have a nice day.”

It used to be that this 301 process would cause damage in search engines, but it no longer does. If you see pages talking about the harm of using 301s, most of those are out of date. Search engines now understand that a person using a 301 redirect like this is doing it for a good reason. Just make sure the page you redirect to really does have the same (or similar) content as the original did.

Always BACK UP ALL YOUR FILES before you begin this, just in case.

So, to start with, you need to install the 301 plugin. I’ve been using this one.

https://redirection.me/

Once it’s installed, I want you to open up three different browsers.

Browser 1: Open your original page which was done in HTML.

Browser 2: Go into WordPress and add a new page or post. I tend to do these redirects as pages, so I can organize them similar to how they were organized originally. But that is up to you.

Browser 3: Go into WordPress and open the new Redirection admin area your plug-in made for you.

Select the content from your original page. For most browsers that means you click-drag over the text and then press CONTROL/C on your keyboard.

Paste that content into your new WordPress editing page. Make whatever changes you want to the title, featured image, content, and so on. When you’re ready, save.

Now that your new WordPress page has an assigned URL, go to your Redirection admin area. Paste in the old URL from your original page. Paste in the new URL from your new page. Save that redirection.

Delete the original page off your webserver.

Now try going to the URL of that original page. You might have to hit CONTROL-REFRESH on your keyboard to get your browser to clear its cache. You should now be able to see the new page when you type in the old URL. The system should automatically redirect you from that old URL to your new better page.

The 301 redirect plugin also shows you counts of how many time the redirect was used, so you can tell if this is getting high usage or just a trickle.

This will let you now edit all your legacy pages in WordPress, give them better names, and keep your server running more efficiently. All without losing any traffic or search engine linkage to that old location.

I’ll give you an example. All my courses in this directory used to be HTML files.

https://aspisfun.com/course/

First I made a WordPress page with a URL Slug name of “course”. I put all the main index.html information into this page. WordPress by default had that page show up at the /course/ location so that worked without any changes at all.

Then I created a new page for each lesson in the course. Those had originally had names such as course1.html, course2.html, and so on. I used the 301 redirector tool to point those old URLs at their new, better WordPress URLs.

That is what is now working on this site.

Ask with any questions!

Be the first to comment

Leave a Reply

Your email address will not be published.


*