How to Add .html to the End of a WordPress URL

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:


You will want to remove that trailing slash, and just add .html, like this:


Featured Plugin - WordPress Newsletter Plugin

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Photo: Html from BigStock


Comments (22)

  1. 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).

    • 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?

  2. 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.

    • 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.