• Resolved 4020

    (@4020-1)


    I am trying to find out how I can save WordPress PAGES using the .htm extension.

    After several hours of research I have read on numerous other posts that I should read this page:

    https://codex.www.ads-software.com/Using_Permalinks

    Unfortunately, I think this page only tells me how to add the .htm extension to WordPress POSTS using the custom permalink option.

    The only other answer I’ve found is to use a plugin such as “.html on PAGES”

    Is there no way for me to save pages as .htm without using a plugin?

    The reason I want to do this is to maintain search engine ranking on many well placed pages that I am moving to the WordPress platform.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Tim S

    (@tim-s)

    If you want to maintain your search rankings just create 301 redirects to your new WP pages. Google and other major search engines pick up on 301’s and you won’t be penalized with a 404 error for previously ranking pages.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The reason I want to do this is to maintain search engine ranking on many well placed pages that I am moving to the WordPress platform.

    You can do that without putting in .html on your pages (which you don’t want to do, as that’s entirely unnecessary). As long as you keep the URL structure the same, this is pretty easy.

    Let’s assume your old pages are domain.com/about.html and domain.com/2011/11/postname.html

    RewriteRule ^(.+)\.htm$ https://domain.com/$1/ [R=302,NC]

    That may be all you need. If not, add this below:

    RewriteRule ^([0-9]{4})/([0-9]{2})/(.+)\.htm$ https://domain.com/$1/$2/$3/ [R=302,NC]

    Make sure they’re ABOVE your WordPress .htaccess calls.

    If you’re dead set on usnig .html, though

    https://wordpresshero.com/tricks/add-html-extension-to-permalinks.html/

    Mind they’re wrong about .html being ranked higher.

    Thread Starter 4020

    (@4020-1)

    Thanks for your replies.

    Tim: I have considered using 301 redirects. However, this would be quite a task as I’m moving approximately 1500 pages. In addition, the site has hundreds of well established incoming links which (I assume) would lose their value if the page names change.

    Ipstenu: The rewrite rule is too technical for my understanding so I guess a plugin seems to be my only option.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    If you use 301 redirects (which is pretty much what I was saying with the .htaccess) then you do not lose link value. I would spend the time to learn how they work, as they’ll be easier to support going forward. No worries about plugin incompatibility down the linw.

    Thread Starter 4020

    (@4020-1)

    I hadn’t realised that. I was under the impression that the name change would destroy all the incoming link value created over many years.

    I do know how to set up 301 redirects using cPanel.

    Would I need to manually list all 1500 pages individually in the cPanel redirect area or would the code you originally posted above deal with a bulk redirect?

    Thanks again for your help.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The name change without a redirect will destroy incoming link value ?? With a redirect though is perfectly fine.

    And you could list all the 1500 pages individually, but if they have a good naming pattern that they use today, and will have a consistent one they’re moving to, the code I gave you can be put in your .htaccess to do ’em en masse.

    And the cPanel 301s are really the same thing.

    So what are your URLs today and what will they be?

    Thread Starter 4020

    (@4020-1)

    I think that the pain of individually creating many 301s will in the long run be worth it. And it allows me to tidy up a lot of pages that could be better named.

    Thanks again.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Sadly sometimes that’s the best way about it :/ Hated it when I did it, too.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Page Extension .htm’ is closed to new replies.