John
John

Reputation: 1

Mass 301 redirect

HI -

I have a site (built years ago) which uses .htm extension on most pages.

I'd like to switch to a Wordpress CMS and use the "html on pages" plugin to re-create the whole site, but then, of course, I would end up with html extensions on all my pages and lose all my search engine placement for the original .htm pages, many of which have first page placement in the SERPs.

What is the correct syntax for a mass 301 redirect that tells the bots that all pages which formerly used .htm extensions are now .html?

Thanks in advance for any help!

J.

Upvotes: 0

Views: 264

Answers (1)

bobince
bobince

Reputation: 536567

What web server are you using?

On Apache you might say:

RedirectMatch permanent ^(.*)\.htm$ /$1.html

(Aside: it's not just SEO! By keeping your old links alive and redirecting to the new ones, you keep incoming traffic and avoid annoying users with 404s.)

Upvotes: 1

Related Questions