Blog SEO Tips – SEO Friendly Titles (H1, H2, H3)
Another quiet Sunday in the blogosphere, as usual. This morning I thought about writing another link share post or a WordPress theme recommendation, but later I’ve decided to break the pattern (since it’s all so quiet) and make Sundays the host of a blog SEO tips series. In this first post I’m going to talk about the importance of using SEO friendly titles (H1, H2, H3) and the right way to do so.
Usual Coding Patterns in WordPress Themes
If you’re even a bit familiar with the WordPress themes, by now you’ve probably took a look at your theme’s files. Blog pages are rendered through an association of a few PHP files with standard names (index.php, archive.php, single.php) with different templates of the theme, based on the content type.
The index.php file usually stands for your home page, also being capable of replacing any other template that hasn’t been already defined. So, if you don’t have a template for search results (search.php), the index file will take over and render your search results page.
Each of these templates includes smaller pieces of code to build up the final result. The most used are header.php, sidebar.php and footer.php.
For now, we’ll limit our attention to the following files in your theme’s folder:
- header.php
- index.php
- single.php
- page.php (not every theme has it)
- archive.php, search.php (not every theme has them)
Optimizing the Header File
Having your primary keyword present at the top of you page it’s very important.
Considering the fact that most themes come with text based logos instead of graphics, we’ll be looking for the <h1> tag in the header.php file.
If you look at the WordPress default theme will find this piece of code, close to the end of the file:
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
The first line displays your blog’s title into a link to the homepage, inside the H1 tag.
The second line displays your blog’s description.
H1 is the most important heading style and the coding recommendations state that only one should be used per page. When talking about a homepage, archive page or search results, it’s best that we optimize these pages according to our main keywords, therefore this H1 tag is required.
But what about on the single post pages? When we display single post, we would want to have their pages optimized according to their content, not the overall keywords of the blog. This is where the H1 should be removed from the header.php file, and placed instead of the H2 surrounding the posts title, to give make it more visible and representative in the eyes of a search engine spider.
How do we do that? First we need to add some conditional tags in the header.
Look for the piece of code that I’ve listed above and replace it with this one:
<?php if(is_single() OR is_page()) {
// On single post pages and static pages we use this code
?>
<h2><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
<?php }
else {
// On home page and archive style pages we use this code
?>
<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div class="description"><?php bloginfo('description'); ?></div>
<?php } ?>
By using some WordPress conditional tags we managed to limit the use of the H1 HTML tag to all archive style pages (including the homepage).
Next, we move to single posts and static pages to continue our optimization.
Optimizing the Single Posts and Static Pages
After we’ve made the changes in the header file, we need to apply some modifications to the single.php and page.php files to make their titles more search engine friendly.
Open the default theme’s single.php file and look for this piece of code:
<h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
Remember that I’ve told you we are allowed to used <h1> only once per file, for our most important title / phrase. Since we’ve eliminated the use of <h1> on single posts and static pages in the header.php, now, all we have to do is to change <h2> and </h2> with <h1> and </h1>, just like this:
<h1><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
There you go, now your most important phrase on a single post page is the post’s title, as it should be!
Most themes don’t come with this type of heading importance separation and by following this guide you’ll be able to fix this issue on your own with no trouble at all.
While the default theme does not have a page.php template defined, you could clone the single.php file and rename it. If you don’t clone it, the index.php file will be used to display static pages, which means you’ll list page titles using the <h2> instead of <h1>.
Consider Using Subheadings in Your Posts
For further SEO improvement, you should consider using relevant subheadings inside your post to evidentiate different parts of your post’s structure.
Write down your article and when you’re finished, switch to HTML view and add <h3> & </h3> around you subheadings, like this:
<h3>This Is a Subheading</h3>
Final Thoughts
Usually, titles are the most important links on your blog. Through them, users and spiders alike navigate through your content. Use them smart and effectively.
If you have any questions or need further help with this, feel free to drop a comment.
Also, join me again next Sunday for a new post in the Blog Seo Tips series.
-
- Spread the love!
- StumbleUpon
- Digg
- Delicious
- Fast & Free RSS updates?
- Join the 1,058 subscribers NOW!
More Blogsessive Content
This article has 27 comments
Add a comment
4 blog posts linking to this article
- Wordpress CMS Part 2: Theme Implementation | Custom Wordpress Theme Design
- SEO-Friendly Content Tips | Blogging Tips from Blogsessive
- Wordpress SEO Article! - Netpond
- Effective Blog Post Sculpting with HTML Headings | Blogging Tips from Blogsessive

Not a bad post. Every person that knows a bit of SEO should know this, and if he doesn’t he came to the right place to read about it.
And talking about optimizing single posts. How about you start with removing the links to the post on your single posts, so you’re not pointing to the same url. It has negative SEO effects.
Try and do a bit of research on it.
Thanks MrCooker. I’ll look into your suggestion. It sounds possible and probable.
Thanks!!
Really nice blog
Very good tips for a beginner in SEO, it will definitely increase the traffic a little.
i removed the (self) link from the post title a few months ago on a blog of mine and the results started to show off just a few days later.
it boosted the SE rankings
After doing a bit of research I’ve decided to do the same. Thank you post for the suggestion. Now, we wait and see for the effects.
Thanks for tips around H tags
I’m newbie in SEO, so every hint is good.
But again…who needs traffic…its more about “Targeted Traffic”.
Different websites value different types of traffic. Niche blogs look indeed for more targeted traffic, and having your titles boosted up by the right tags will only help your blog reach more search engine users for more relevant keywords. This is targeted.
SEO Pune, don’t be stupid! Search Engines send you the most targeted traffic.
Great tips. Thanks!!
That is one extended tips. Pretty open and great for SEO learners.
I was just wondering if putting nofollow tags has got to do anything with traffic? Because I heard putting nofollow could narrow down the flow of traffic to a blog or any websites.
Thanks again in advance.
Chris
@Chris: Some people say “nofollow” links can help building traffic. I guess is all comes down to each one’s personal way of implementing them.
I can recommend you 2 great articles that will bring more light about “nofollow” links:
Nofollow in Google, Yahoo and MSN
Sculpting with Nofollow Works Pretty Darn Well
Personally, I like the idea of sculpting spiders’ way into your content through “nofollow” links, like SEOmoz explains and proves.
Hope this helps.
Optimizing Titles with header titles also help boost your rankings. Thanks for the tip..
Just SEO It
Admin
nice very informative.
hey, good stuff here, thanks for sharing this. if you have time check out my post on this topic as well. Making Your Blog SEO Friendly I have been talking about some regular update of quality content.
Very good article. I tried to make modification on my blog, and it wasn’t so easy. Why? Because styles are related to H1 and H2 tags. After replacing H1 with H2 on single page I got messed up font size, text position, hover … I have to fix style.css. Anyway, I think that invested time and effort for proper H1 usage will certainly be paid. Thank you!
Nice post ,but I have Blogspot how do I implement this ,thank you.
nice tips for word press seo.
plz provide same guide for blogspot host blogger.
thanks
Thank for this article!
I’ve applied to my blog and it worked like a charm!
Maybe you can do a Theme development tutorial once, that would be awsome!
Hey nice article!!! But there is a mistake in the first code to paste!!! On the fourth row the open tag is as it should be but at the end of the row it should be also instead of . Hope I helped..
Fantastic article! Find sometimes all the Wordpress tags are a little confusing. But this is realy straight forward. Thanks!
wow very helpful.
I really need this to increase page ranking.
Thank you for sharing it
Excellent!!!..Most often we get general advice. This is something really technical…
Hats off to you
cool stuff! i’ve done this on my blogger account… and after reading your article, i’ve got the confirmation that what i’ve done is correct and actually does optimize the SR. many thanks!
@liveabeautifulife: Thanks for the confirmation and I’m glad it helped you.