Dreamweaver LogoOne of the biggest pains when doing SEO work is handling Dreamweaver Templates, especially when it’s chock full of JavaScript. For one thing it’s just not clean coding. Dreamweaver templates add in a ridiculous amount of unneeded coding for websites, making your SEO fine tuning a little more complicated when you’re not familiar with them. This post is basically designed as a guide to help you understand SEO from a DW template perspective.

Understanding SEO in Templates

First thing’s first: When you make a change in a template it will have a site wide effect, but only on the pages where the template is being used. You will see somewhere along the document something like this:

<!-- #BeginEditable "doctitle" -->
<!-- #EndEditable -->

Whatever is inside these editable regions is the actual content of the page, anything else is the template. Therefore make sure there is an editable content area for the title and meta tags of a page. Of course, the editable regions need to go within the head tag so that it shows up in the applied pages. To demonstrate an example I’ve used some coding from one of my past clients:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- #BeginEditable "doctitle" -->
<!-- #EndEditable -->
</head>

YES, I know it says HTML 3.2. The site was made a long time ago… ;) Anyways this is what the template will look like.

This is what the actual site of a page with the attached template will look like:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html> <!-- #BeginTemplate "/Templates/plantilla2.dwt" --><!-- DW6 -->
<head>
<!-- #BeginEditable "doctitle" -->
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Your Title</title>
<meta name="description" content="Your description">
<meta name="keywords" content="Your keywords">
<!-- #EndEditable -->

Look at the code next to the open HTML tag, this simply states that the template is now being applied to this page. Obviously it was applied using DW 6. Gray means its template code and it cannot be modified. It can only be modified from the template itself, which will have a .dwt as the file name extension.

DW Templates can be Assigned to Certain Pages

In order to make the site a lot easier to read for Googlebot, or any other type of Bot, detach the template to the parts of the site that doesn’t need them. For example, if you are creating a “Recommended Sites” page, you might not need the same template as the front page or products page. Simply create a simple, yet elegant style, for that page without the Template.

Optimize the Template First

SEO the template FIRST before you do any other tweaking to ANY other part of the site. This will help you in two things: Understanding the structure of the way the template is used through the site, and getting SEO done to a large amount of the site at once. It’s extremely important to realize where the template is being used and also to understand that some changes you do in the template will have a global effect on the whole site, or at least on the parts where the template is being used. IMPORTANT: Do not add meta tags to the template! Read Below

Do not add Meta Tags to the Template

You are going to SEO the pages that actually matter, not to the template that the site uses in General. What I mean by this is that if you add meta tags to the template, it will “collide” with the tags you add to the real pages that need the SEO. Therefore avoid meta tags on templates. You can, however, add a Doc Type so that the bot crawling goes by a lot smoother. If the template is heavy on images it is important to add alt tags to optimize its usefulness through the site.

Optimize Dreamweaver Libraries

If the site has DW templates, then it’s a sure bet it also uses Libraries. Libraries are basically the same as Templates, the only difference (that I’m aware of) is that Libraries are basically Menus instead of page wide styling. Libraries are important to SEO only if they contain images or sloppy looking URLs. If that’s the case, change the URL to the desired keyword and add in alt tags to the menu images. If the library has coding errors, fix them. Every little bit counts for SEO juice ;)

Adding CSS to the Site

This is not really SEO, just a quickly. If your adding CSS, add it to the template. This only works on the pages where the template is being used. This way you will avoid the hassle of adding CSS on every single page when there just isn’t a lot of CSS to create a separate style sheet.

DW Templates aren’t generally harmful for SEO. There have been no ranking problems or incorrect coding output due to the use of DW Templates. For SEO purposes, one must keep a couple of things in mind before making any changes in order to avoid going back and re-doing a couple of things. Well I hope this helps somebody, please let me know by adding a comment or just sharing your thoughts. Thanks.