By default, WordPress uses a URL structure that doesn't include file extensions like .html. Nevertheless, it is worth considering the potential advantages and disadvantages of deviating from this rule and including extensions into the permalinks.
Many top-ranking websites on search engines may include links that lack the .html and.php extensions. In most cases, adding them to your new URLs is not necessary from an SEO standpoint.
Although this is a general rule, there are certain situations when it may be beneficial. A good example of this is when you have switched your store from Magento to WooCommerce or plan to do so soon.
How to Add HTML to WordPress Permalinks?
Built-in Settings for Permalinks
As previously stated, WordPress does not automatically append .html to standard URLs. If you need this feature, you do not need any additional plugins and you can enable it directly from the WordPress admin dashboard.
It is extremely straightforward and you can make it work with only a few clicks.
- Navigate to Settings > Permalinks using the sidebar menu.
- Select the "Custom Structure" option.
- Add .html suffix to the end of input field
Permalink Manager
Although there are a variety of ways to add html to a WordPress URL, Permalink Manager seems to be the fastest and most straightforward, particularly if you are not familiar with programming.
The instructions below apply to WooCommerce permalinks, but you may do the same with other content types in a similar manner. If you want to append the file extension to your URL addresses, go to the "Permastructures" section and use the permalink format editor.
The procedure is quite simple. Find the content type where the file extension should be added to the permalinks and enter it at the end of the input field.
If you want apply the new format to existing content and append the extension to the old URLs, use the "Regenerate/reset" tool. More information on how to regenerate custom permalinks may be found in a separate article.
From now on, all new permalinks will end with .html file extension. If needed, you can individually tweak each of them using "URI Editor".
Does It Matter for SEO if the URL Ends With an Extension?
The answer depends on whether or not your website is listed with the extensions in the URLs. Changing the URLs, which involves removing the file extension, can potentially result in a loss of traffic. That being said, every modification that may impact SEO has to be carefully analyzed beforehand.
What Does Google Recommend?
If this is not enough to persuade you, read on. This subject has been already addressed in one of the videos on the Google Search Central YouTube channel. According to John Mueller in the video, Google does not care whether URLs terminate in .html, .php, .asp, or have no file extensions at all.
However, if your Google ranking is strong, keeping the URLs the same after the Magento to WooCommerce migration is a good idea from both an SEO and UX standpoint. Therefore, keeping the .html extension in your shop permalinks after migrating makes sense.
Does WordPress Automatically Append .html to Permalinks?
It is generally not necessary to include the ".html" file extension at the end of your permalinks (also known as URLs). In fact, many content management systems, including WordPress, do not use the ".html" extension by default.
It does not seem that using file extensions like .html, .php, or .aspx in the URLs, improves the website's search engine ranking. Therefore, it is recommended to use permalinks without them, as this ensures that the URLs are readable and usable.
Migrating From Different CMS
All of the above applies to websites and content that have not yet been ranked. In a specific case, though, it might be advantageous to include the file extension in your URLs. This is necessary if you wish to keep your pages' original URL structure while moving them to WordPress from another CMS.
If your Magento store URLs ended in .html and you are switching to WordPress, you may want to keep the same structure after the migration so that your customers can still find your products. It may be difficult, however, to maintain your original permalink structure using simply WordPress's built-in features. Permalink Manager may be the most straightforward answer to this issue.
You can use the plugin to recreate the original permalink structure of your Magento shop by removing the WooCommerce rewrite bases added to native permalinks. Simultaneously, you may add .html to the URLs of products and product categories.