A friend of mine was amazed how a popular WordPress blog was having the URL end with .HTML Extension. So, he pinged me up on Facebook and asked me to tell how he should add .html extension at the end of the posts as well as pages URL. At that very moment I thought of all of you (my readers) and planned to write a tutorial for you all.
So, here is the way to add .html extention to your wordpress posts as well as pages.
This tutorial is divided into 2 parts:
1) Adding .html extension at the end of the post’s URL
2) Adding .html extension at the end of the Pages’s URL.
Is the way of adding .html extension to posts and pages are different? The answer is YES.
To add .html at the end of the posts, we simply need to edit our Permalink Structure in WordPress.
To edit permalink. Click on Setting > Permalinks > Custom Structure and just add .html at the end of the permalink structure.
After updating the permalink structure, as soon as you refresh your website. The URL would have .html at the end of every post.
NOTE: You need to remove the Trailing ‘/’ from the end of the post and add .html to it.
To add .html extension to the pages, we would need to install a plugin. The plugin is “.html on Pages“. This plugin has not been updated since 2 years but it is still working fine with all the latest version of wordpress (tested by me itself). You simply need to download, install and activate this plugin.
The URL of your pages will automatically change to the .html extension.
NOTE: If you need any help while installing the plugin, you can refer to the article ‘How to Install a Plugin in WordPress‘
Comments are appreciated !




Pavan Somu
So finally you got a solution for your doubt. I appreciate your sharing Harneet.
Harneet
Thanks Pavan for dropping by. Keep Visiting for more informative articles
sandeep kumar
Thanks Harneet for sharing tips to add .html extension
Although I am still confuse why people want to add .html extention at the end of page url
As a programmer I am not able to understand the logic behind it…
but that’s the problem with me…
Thanks for sharing bro.
Harneet
Thanks Sandeep for dropping a comment. Actually sandeep by adding .html extension at the end, it seems like the pages are static to the search engines. Keep visiting for more info.
Vignat Vora
If we change permalink structure, don’t we need to do a redirect ? Otherwise, in some situations , there will be 404 error.
Harneet
Thanks Vignat for dropping by. In most of the cases it would not cause any errors. But to ensure it you can try Broken Link Checker plugin to check if any link is broken.