Define a site in Dreamweaver

When you start working with a website in Dreamweaver, you must instruct Dreamweaver to treat the material you're working with as a website. You must perform this task any time you start editing a new website in Dreamweaver and any time you start using Dreamweaver on a different computer.

If you don't define the site for Dreamweaver, you will end up with broken links between files and broken images, because Dreamweaver will treat connections between files as absolute links instead of relative links. So while an undefined site may appear to work properly on your computer, once you view the site on a different computer or try to publish the site, you or your viewers will start to encounter the problems. Moreover, you won't be able to publish your work to a server until you do define your site.

To define a site

  1. On the Site menu, click New Site.
  2. In the Site Name box, type a brief but descriptive name for your site. This name is so you can distinguish among the different sites you're working on in Dreamweaver.
  3. Next to the Local Site Folder box, click the Browse for folder button Browse for folder button.
  4. Navigate to the folder that contains your website, and then click Select Folder.

    Site Setup dialog box
  5. In the left column, click Advanced Settings, and make sure the Local Info option below is selected.
  6. Next to the Default Images folder box, click the Browse for folder button Browse for folder button.
  7. Select the images folder for your current site, and then click Select Folder.
  8. Click Save.

To export your site definition

If you ever move computers, you will have to define your folder as a website again for that workstation. You can go through the steps above again for that computer, or you can save some time by exporting the definition you've already created. If you export the definition and then later switch computers, you can simply import the existing site definition to save a few steps.

  1. On the Site menu, click Manage Sites.
  2. In the list of sites, select the site you want to export the definition for.
  3. Click the Export the currently selected site(s) button Export the currently selected site(s) button.
  4. If you're prompted to back up your settings, click OK.

    Note: This option backs up any user names and passwords you've set up for publishing your site. Retaining a copy of these items can save you time and frustration later.
  5. Navigate to the location where you wish to store the definition.

    Note: Consider storing the definition in the same folder as the website you've defined.
  6. Click Save.
  7. Click Done.

To import your site definition

If you end up switching computers and you have saved your site definition, you can import it to save yourself a few steps. It is possible even with the definition file that you may have to point Dreamweaver to the correct location for the site folder and images folder, so pay attention to any dialog boxes that appear.

  1. On the Site menu, click Manage Sites.
  2. Click Import Site.
  3. Navigate to the location of the site definition (.ste) file for the site you wish to import.
  4. Select the site definition (.ste) file, and then click Open.