I have a site on another platform that I want to move to WordPress. One of my issues is that all the URLs end in .html, and I’d rather not change that. Keeping everything the same as much as possible reduces the chance of losing any SEO juice I’ve built up.
And so the challenge was to get WordPress URLs to end in .html.
It turns out the answer is very simple—just attach .html to the end of your custom permalink setting.
(Settings >> Permalinks >> Custom Structure)
NOTE: Typically a custom structure has a trailing / on the end like this:
/%category%/%postname%/
You will want to remove that trailing slash, and just add .html, like this:
/%category%/%postname%.html
Featured Plugin - WordPress Q&A Site Plugin
Photo: Html from BigStock


Well, this only works for posts, not pages.
What to do when I want to do this for pages (and category-pages etc)?
@Stefan – I’ll post something tomorrow for pages. But for now, here’s a plugin for that: http://wordpress.org/extend/plugins/html-on-pages/
Easy enough, but there can be an issue when it comes to adding .html to pages (not just posts), and an even further tweak needed when it comes to the “blog page. Check this out.
http://webdevstudios.com/2009/11/02/change-wordpress-permalinks-on-pages-to-have-a-html-extension/
Jeff – Thanks for that. Will have a look at it.
What’s the advantage of doing this?
With a legacy site that has used that extension for a long time, it can be better than setting up a 301 for thousands of URLs.
If you’re starting a new site, there’s no real reason to do it. But if you already have a site that has .html as I did, and you want to move it to WordPress, then it helps to keep everything the same.
Yeah – why do that?
There are also some indications that static pages tend to rank better in search engines (google), and trying to fool them that your site is static might be a good thing.
Just adding .html isn’t enough of cource, you need to remove every trace of wordpress (wp-content ie).
Stephan – I’ve heard that too about static pages. Was thinking of doing a post on it. I’ve looked into it a little hoping to find some quick evidence. Haven’t found anything solid yet, but I haven’t looked into deeply.
Have you seen anyone with some credible evidence?
No I don’t have evidence. I haven’t done any testing myself.
I dunno. Seems like wordpress does pretty well with SEO without the need to add a fake .html – I seriously doubt this matters.
I’m not sure it matters either. But I have heard some people claim that pages do better than posts.
Would like to find some hard evidence on it.
You have to be vary careful with this, using a plugin to add .html to pages and a caching plugin can give you lots of headaches.
Christopher – Well, for the posts, it’s about adding it to the permalink. But for pages, I was thinking about a plugin.
Do you know of a better way that would avoid any possible problems?
hello sir . i want to add .html to my posts but my website is about 2 months old and it has about 200 pages indexed with permalink structure /%category%/%postname%/ . if i will change the structure then search results from websites show error 404 . is there any solution to that .
Please give me some suggestions.
Thanks
Aaditya – Is there a reason why you why you want to add .html to your URLs? This solution is really for existing sites that ALREADY have .html but aren’t on WordPress. The goal is to keep the URLs the same. If you are already on WP, personally I wouldn’t change anything.
But, if you still want to, you need to look into “301 redirects.” You will need to research that.
Good luck.
Try to use Platimum SEO Pack. It has an option to automaticaly add 301 redirects, when you change the permalink structure.