HTML Improvements: Duplicate title tags

Install WordPress icon

Google Webmaster Tools offers a great deal of help and information to improve your website.

Whilst it is difficult to measure the impact on website traffic, it makes sense to me that you should set the highest quality standards for your website.

We often focus on the quality of content, and the quality of our search engine rankings. Google Webmaster Tools certainly gives crucial information in that regard. It also gives other suggestions on how we might improve website quality.

In the Search Appearance section, we can see HTML Improvements. Google tells about several potential issues under the heading:

Addressing the following may help your site’s user experience and performance.

So, it’s a “may help,” and we can’t quantify it, but it is well worth checking any items in the list that have blue links associated with them. Before I explain duplicate title tags, and how to avoid them, let me stress the importance of the title tag.

When your page appears in search engine results, the title is always the highlighted heading to your listing. In marketing terms, this is what gets potential visitors attention. It needs to appeal to your visitors. In most cases, it will be a single sentence summary of your article. Using the skills of newspaper headline writers, you should make it as compelling as you can. It also needs to be unique on your website.

If you have 2 or more articles with the same title, how is the search engine going to decide which one is the best to include in results? You can help search engines by always adopting unique titles.

Or can you?

As well as your normal posts and pages, WordPress will add archive pages for tags, categories, authors, dates, and other custom taxonomies if you use them. In most WordPress themes, all the pages in an archive will get the same page title. After you have published more than 10 pages, you might begin to see warnings in Google Webmaster HTML Improvements Tool under the duplicate title tags link.

Google makes it clear what it expects, but unfortunately, doesn’t tell you how to achieve it.

Your title provides users and search engines with useful information about your site. Text contained in title tags can appear in search results pages, and relevant, descriptive text is more likely to be clicked on. We recommend reviewing the list and updating the title tags wherever possible.

I’ve added the bold to emphasize the importance of your title tags. Now, archive pages are not always vital to your success, but it never harms you to make them unique. More importantly, by removing them from the Google list, you can focus on other examples of duplicate titles that are more important. I used to have a bad habit of giving featured images the same title as my post. But, WordPress uses the title for that images own attachment page. Extra attachment pages can be very useful for adding depth to your content, but some of the benefit is lost if the title is not unique. That error is easily fixed by changing one of the titles. Duplicate titles in archive pages need a little more work.

To stop the duplicate title tag, we need to change the WordPress Theme (see update below for a better solution). This is very easy using Orbisius Theme Editor, which is a faster alternative to FTP and the WordPress file editor. We are going to change header.php. which Orbisius copies by default when we create a child theme. We have to customize a child them, because any changes to parent themes are lost when the theme is updated.

Near the top of header.php, you will find a line similar to:
<title><?php wp_title( '|', true, 'right' ); ?></title>

All we need to do is change this to:
<title><?php wp_title('|', true, 'right'); ?><?php if (is_paged()) echo ' | ' . sprintf( __( 'Page %s' ), max( $paged, $page ) ); ?></title>

The page number is now added to the title, and uniqueness is restored.

Update: Duplicate Title Tags Function

As you know, I hate customizing themes, as the improvements need to be added every time you change theme. There is a better way to avoid duplicate titles by filtering the wp_title() function. Filtering wp_title() for Better SEO, works perfectly.

Please note that, Google can take some time before it recognizes your changes. You can reduce waiting time by encouraging Google to re-index using Google Webmaster Fetch As Google Tool. After fetching, click the Submit to index button to encourage re-indexing.

Do you have any problems, opinions or experiences with duplicate title tags? Share them in Shrewdies Make a Website Group, or Shrewdies Website Help Chatroom.

Leave a Reply