Computing Magazine

Duplicate Title Tags Caused from WordPress SEO by Yoast

Posted on the 28 June 2012 by Dfennell @BloggerGo

If you are using WordPress SEO by Yoast or any other SEO plugin, you need to ensure that they are not generating duplicate title tags.  I just very recently ran into this issue, but we found a solution before it was too late.

This blog is my very first experience with using the WordPress SEO by Yoast plugin.  This plugin is fantastic, and I have no complaints so far.  It is doing everything that it is advertised to do.

However, if you are using WordPress SEO, you need to check to see if you have duplicate title tags.  Sometimes, certain themes and plugins are not compatible working together.  Every theme and plugin is coded differently, and sometimes their functionalities will conflict with each other.  Sometimes these issues have a simple solution, and other times, you will be forced to delete a plugin and try another.

This was my experience when I installed and activated the WordPress SEO plugin.  The plugin was not properly rewriting my title tag templates defined in my header.php file.  Even though I was checking the box “Force rewrite titles,” it was just simply duplicating the title tag.  This is absolutely no good for SEO, and if you unknowingly have duplicate title tags, your blog will be doomed in the search results.

I did not realize this issue until I was sharing my content in Google+, and was noticing that my titles were being repeated twice.  For example, my home page title was appearing as:

BloggerGo | The How to Blog Spot BloggerGo | The How to Blog Spot

This same title structure was also being generated on blog posts with the title being repeated.  I started doing some research to find out what the issue was.  Thankfully, I found this issue and was able to remove these duplicate title tags before the search engines had time to crawl and index my pages.

Do you have duplicate title tags?

Fortunately, checking to see if you have duplicate title tags is a snap.  Just simply check your page source code.  If you are using Internet Explorer; in your browser, go to:

  • View >> Source

If you are using Firefox, go to:

  • Tools >> Web Developer >> Page Source

You can also just simply hit Ctrl+U

You will see a window open with a bunch of HTML code.  This is what the search engines see when they crawl a web page.

Near the top of the source code, you should see your page title as illustrated below.

Title Tag Example image

The first title tag in your source code

Scroll further down the source code until you find your WordPress SEO by Yoast code as illustrated below.

Duplicate Title Tags image

A duplicate title caused by WordPress SEO

If you find your Title Tag at the top of the page source code that begins with <title> and ends with </title>, and the same exact title structure is found in the “Yoast WordPress SEO plugin” portion of the code, you know that you have duplicate title tags.

How to remove duplicate title tags…

When you research around, you might find a suggestion for replacing the title section of your header.php file with this line of code:

<title><?php wp_title(”); ?></title>

This may or may not work for you.  This kind of worked for me.  But all it did was remove the first title tag found at the top of the source code, and left the title in the WordPress SEO plugin section.  While this solution will not cause any SEO issues, a title tag should technically be one of the first elements in the source code.  Removing the title tag that came first made me a bit nervous.

If you don’t feel comfortable modifying the code in your header.php file, there is a much easier solution for removing these duplicate title tags:  Just don’t input the SEO titles into the WordPress SEO by Yoast plugin.  Leave the SEO titles and templates for your home page, posts, pages, categories, tags, and archives blank.  Don’t even fill in the SEO title in the WordPress SEO portion of your post editor screens when publishing a post.  Fill in the Meta Description, but leave the titles empty.  When publishing a post, you’ll notice that your title still appears in the “Snippet Preview” even though the “SEO Title” field is blank.  I know that this sounds scary, but it works.

Your title tag will still appear at the top of the source code where it should, but it will leave out the title in the WordPress SEO section of the source code.  It will now look like this:

No Title Tag Example image

The problem is all fixed!

You’ll notice that there is not a title tag included in this portion of the code.  The plugin is only including the Meta Description and other pertinent information.  Scroll up to the top of your source code, and your title tag is still where it should be.

This easy solution solved my duplicate title tag problem.  Depending on your theme, this solution may or may not work for you, but give it a shot.  I have a feeling that it will.  If this does work, you are all set.  No more duplicate title tags for you.

What are you thoughts?  Have you ran into duplicate title tags before?  How did you fix them?

Duplicate Title Tags Caused from WordPress SEO by Yoast is a post from: BloggerGo

 


Back to Featured Articles on Logo Paperblog

COMMENTS ( 1 )

By Leila
posted on 28 June at 22:39
Report spam/abuse

Hi, just wanted to mention, I enjoyed this article. It was helpful. Keep on posting!