Use Dreamweaver to find and fix your website's broken internal links

See why Dreamweaver is the ideal tool for locating and fixing broken internal links on your local websites.

 A continual maintenance headache for web developers and website content owners is ensuring that all of their sites' links, images, embedded URLs, backgrounds, and image maps are performing as expected. You can automate this task by using tools specifically created for testing and checking all links on your local sites, intranet, Internet, or other URLs including external links.

In this two-part series, I'll review several tools that can help you find broken links. This first installment focuses on Dreamweaver, which can only be used for searching local internal links. The second installment will cover open source and free tools that can find external broken links in your websites. (Note: I used Dreamweaver CS5 for this tutorial, though the steps apply to other versions as well.)


First, you need to define a site using Dreamweaver's Site Setup. To create a new site from the Dreamweaver top toolbar, go to Site | New Site (Figure A).

Figure A


Next, you can name the site and browse to the local site directory by clicking the folder icon (Figure B).

Figure B


Once you're happy with your site name and local directory, click the Save button; your new site will show up in the Local Files directory (Figure C).

Figure C


With Dreamweaver, we have three options to check: the current document (web page), the entire site, or the selected files within the site. To check just the current web page document, from the Dreamweaver toolbar go to File | Check Page | Links or press [Shift]F8 (Figure D).

Figure D


For demo purposes, I created two broken links for the link checker to find. The link checking results are displayed in the Link Checker tab group (Figure E).

Figure E


To fix the broken links, click over each link displayed under the Broken Links column and enter the correct URL. If no known URL exists, then most likely the web page has been removed from the site, and you can delete the associated anchor reference. After entering the correct link, Dreamweaver will ask if you want to update the link in the file as well (Figure F). Click the Yes button to fix the broken references in the file.

Figure F


The links are updated, as shown in the example in Figure G.

Figure G


To check for broken links in the entire current local site, click the drop-down arrow at the left side of the link checker tab group, and then select and click the drop-down option to Check Links For Entire Current Local Site (Figure H).

Figure H



In this example for the entire local site, it returns 139 broken links with 199 orphaned pages (i.e., webpages without links to them) (Figure I).

Figure I


To view the orphaned files, select the option under the Show drop-down menu for Orphaned Files (Figure J).

Figure J


In this case, most of the orphaned files are under a beta directory, so we'll probably ignore those files. We're looking for any current site files that are also in a production environment.



By Ryan Boudreaux

Ryan has performed in a broad range of technology support roles for electric-generation utilities, including nuclear power plants, and for the telecommunications industry. He has worked in web development for the restaurant industry and the Federal g...