FireworksColdFusionDreamweaverFreehandFlashMXHome
Past Week's New Content

Latest Free Content
View All
Free Content
Accessibility
CMX Learning Guides
Hosted by enterhost

How to change the default file extension from .htm?

Knowledge Base

Posted by Laurie Casolino

Dreamweaver 4 made it very easy to change the default file extension from .htm to .html. DWMX is a little trickier though...but still very simple. You just need to edit one of the DWMX XML config files.

DWMX comes with .htm as the default doc extension. Many people prefer to use .html and remember how simple it was to change that default extension in DW4. One quick change in your preferences and you were done. In DWMX the change is not so intuitive. To make the change in DWMX you need to edit one of the XML config files that comes with DWMX. Sounds a lot more complicated than it really is, trust me. Follow the simple steps below and you'll be creating pages with the .html extension in no time. As always, to be safe, make a backup of the .xml file before making any changes. Better safe than sorry I always say. :-)

  1. Go to Programs->Macromedia->DreamweaverMX->Configuration->Document Types
  2. In the Document Types folder there is a file called "MMDocumentTypes.xml", open this file. While you can open this file in DWMX, I prefer to play it safe and use a text editor such as Notepad (Windows) or BBedit (Mac).
  3. Look for the following lines of code at the beginning of the document:
<?xml version="1.0"?>
<documenttypes xmlns:MMString="http://www.macromedia.com/schemes/data/string/">
<documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,
stm,lasso,xhtml" macfileextension="html,htm,shtml,shtm,lasso,xhtml" file="Default.html" 
writebyteordermark="false">
  1. On the third line, after "winfileextension=" you see a list of document extensions, with html and htm being the first two
  2. Simple reverse the order of those two extensions. If you are on the Windows platform, the section of the line of code reads: winfileextension="htm,html, shtml etc," will now look like this: winfileextension="html,htm,shtml, etc." If you are on the Mac platform, do the exact same thing, only changing the extension order after the part that reads: macfileextension=
  3. Save the file.

From this point on, documents you create will be saved with the .html file extension rather than the .htm extension, unless you tell it otherwise.