All pages on the website have a structure provided by HTML. HTML provides the structure of content, text, tables, titles, and lists on a web page that makes the page easy to read. While saving the HTML document has an extension like .html. Therefore, the website URL has an extension of .html. The .html extension can be easily removed by editing the .htaccess file.

You have to follow these steps:

  • Sign in to the Cpanel account.
  • In the Files section, click the File Manager icon.
  • Click the Settings button in the top right corner.
  • If you want to make changes to the main domain then click the radio button next to the Web. If changes are to be made to Other Domains, then click the drop-down menu and find the domain where the changes will be made.
  • Remember to check the checkbox next to Show Hidden Files. Now click the save button to return to the File Manager window.
  • You are now in the root folder of the domain you selected to make the changes. Search for the .htaccess file and right-click on it. Click the Edit menu. You can now add code to the .htaccess file.
  • Enter the following code inside the .htaccess file:


RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^([^.]+)$ $1.html [NC, L]