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 !