Ever since WordPress burst on the scene and gained huge popularity among designers, developers and Joe Blow bloggers, it has become shockingly easy to create SEO-friendly content. WordPress handles everything for you: Pretty spider-friendly URLs, semantic content, accessibility, and structurally accurate heading tags.
Wait scratch that last one. I’ve always been suspicious that WordPress’s HTML heading structure was slightly off, and recently my suspicions have been (evidently) confirmed. Two articles have provided some important info to help front-end developers, content strategists, and SEO experts structure their content in a more accessible, semantic, and SEO-friendly manner.
SitePoint and 456 Berea Street
The two articles in question are:
- Heading Headaches: Balancing Semantics and SEO on SitePoint; and
- Headings and Document Structure Conclusions on Roger Johansson’s 456 Berea Street.
Here are two pertinent quotes from those articles:
“[S]earch engines like Google seem to reward pages that use a single
<h1>tag for the title of the unique content on the page… In short, until such time as standards like WAI-ARIA enable us to label page elements like navigation without headings, we must use heading structures that begin with
<h1>) for “boilerplate” content like navigation menus, headers, footers, and sidebars.”
– Kevin Yank, SitePoint
“Use only one h1 heading per document, and use it for the document’s main heading, not the site name or company logo… If a document needs a heading before the main heading in the source order, for instance to identify navigational sections, start with an h2 heading.”
– Roger Johansson, 456 Berea Street
How Does WordPress Screw it Up?
WordPress, by default, structures the headings as follows:
<h1>tag is set on the website’s title on EVERY page
<h2>tags are set for post titles, sidebar headings, and other sub-sections
So, if what SitePoint and Roger Johansson are saying is true, then WordPress’s document structure is not giving developers and bloggers the best shot at having their content rank well.
I did a cursory check of source codes on various popular blogs, as well as a few popular WordPress themes, and nearly all of them keep the default structure intact, or have some other poor structure in place. The only ones that adjusted the heading structure to match what SitePoint and Johansson are advising are, well, (no surprise) SitePoint and Roger Johansson’s blogs. Oh, and you can add my blog to that list too, as of today.
It was amazing, too, how many sites failed miserably in this regard. Some sites had no
<h1> headings, while one even had dozens of
<h1> headings on a single page!
You Can Correct It, But There’s a Drawback
To correct the problem, just edit the default structure to conform to that outlined in the two articles mentioned above. That is, use the
<h1> tag on your home page for the website’s title, then use
<h2> tags for article titles on the home page. On inner pages like single post pages, archives pages, and regular content pages (about, contact, etc), use
<h1> for the main title of the page (not your blog’s title), then descend from there where necessary. On those inner pages, it’s perfectly acceptable to make the website’s title a simple anchor tag, or even an
The drawback to doing this is that not only will you have to edit your CSS to correct the styling of the headings, you’ll also end up having gaps in your headings in articles where the
<h3> tags were added manually. So, after correcting the problem, your post title will be
<h1>, and your post headings will be
<h4>, etc., with no
If you have hundreds of articles archived, it’s obviously not an option to go back and manually change these. I don’t have an insane amount of content on this site, so I went ahead and made the change, and I’m planning to slowly go back and change the
<h3> headings to
<h2>. Or I might just get lazy and leave them be, figuring the benefits will outweigh any potential problems with the “gaps” in the structure.
Should WordPress Change its Default Structure?
I have no idea if it’s possible or even feasible for the WordPress team to change the structure of the headings in its default state, or what effect it might have on WordPress development. At the very least, this gives individual developers and bloggers a slight advantage in SEO and accessibility that could prove fruitful in the long run. Since most WordPress-driven sites will have the wrong heading structure, those of us who customize our code to match these apparent “best practices” will likely reap the benefits.
Of course, this type of SEO analysis is not the determining factor in high Google rankings. Good content with poor semantics and structure will always surpass poor content with good semantics and structure. But for those cases where content is on equal footing, these suggestions may give some bloggers the edge.
Update: In the comments, Ipstenu pointed out that WordPress 3.0 implements the improvements that I’m discussing in this article. I downloaded WP 3 Beta to confirm this, and he’s correct. The single.php file now uses
<h1> for the content title, while header.php will display the title of the website as
<h1> on the home page, but then switch to a
<div> when not on the home page.