How To Fix WordPress SEO Yoast Duplicate Site Titles

One of the first plugins we install when we are creating a new WordPress website or when we on-board a new SEO client who already has a WordPress website is WordPress SEO by Yoast. It’s a great tool to have on your website to monitor on-page SEO, as well as handling some more technical things like sitemap creation, webmaster verification, and even some basic rich snippets.

One issue that I have encountered on a few websites is that once the plugin is installed, duplicate site titles will appear across the whole site. It doesn’t happen every time I install it – so it must be dependent on the theme you are using. However, I have noticed it enough to feel like posting a fix is necessary. This fix is a bit more technical, so if you aren’t comfortable editing code, you may want to talk to your webmaster.

There are two parts to this fix. The first part is simple: log into WordPress and go to the Yoast plugin options. It should be labeled ‘SEO’ on the menu bar. Go to ‘Titles & Metas’ and under the ‘General’ tab you should see an options for ‘Enable force rewrite titles.’ Make sure this is unchecked.

The second part requires you to have access to edit the header.php file, either in the WordPress editor or any other file editor you have access to. You will need to replace the contents of the <title> tag. The default code in this section will look different from one theme to the next, but the fix is the same no matter what.

**If you’re not comfortable editing code, be sure to consult your webmaster!

Replace everything in between the <title>…</title> with this snippet of code.

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

This should fix the duplicate site title issue. You will have to go to each page and use the Yoast plugin to make sure your page titles are exactly how you want them to look.



2016 SEO checklist




About
Showing 22 comments
  • Mickey
    Reply

    Great post. I was wondering because in my install of the themes header.php the tag title isn’t there.

    Here is my header

    <?php

    /**

    * The Header template for our theme

    *

    * Displays all of the section and everything up till

    *

    * @package CMSSuperHeroes

    * @subpackage WP Petvet

    * @since 1.0.0

    */

    ?>

    <html >

    <meta charset="” />

    <link rel="pingback" href="” />

    <link rel="icon" type="image/png" href="”/>

    <script src="/js/html5.js” type=”text/javascript”>

    <body >

    <div id="page" class="”>

    How would i fix the duplicate error in this case given that the isn’t there. Could i just add it?

    Secondly in the latest version of Yoast, under titles & metas in the generl tab there is no longer the option to force rewrite.

    Thanks for the post

    • Ben Johnson
      Reply

      Thanks for the question.

      I have ran into a few themes that don’t have the title tag in the WordPress Editor. It is there, I consulted with our web developers to help out with that in those cases. You may need to do it through FTP.

      With the latest update I was a little confused on how to edit individual page titles, descriptions etc. at first. When you get to the Yoast section on the page, just hover over the snippet preview and you will see a pencil. Click on that and you can edit it there.

  • Trademarkos
    Reply

    Yeaah! Great work!
    “Seo Yoast” did duplicate titles in my site, but is fixed with this tip. Thanks a lot, buddy! 😀

  • Eduardo
    Reply

    Thank you so much, it worked 🙂

  • Jana
    Reply

    Thank you. You helped a lot! 🙂

  • Denina Martin
    Reply

    Hi, I am having the same issue with the title tag. I just don’t see it in the header.php. I looked at the ftp and wp editor, but it’s just not there. Here is a copy

    <html >

    What I am trying to accomplish is avoiding duplicate page title. For example when I look at page 2 on my blog posts I see exactly the same title as the home page, but It should be something like that “Page 2 of 250”

    Could you please suggest what I am doing wrong.

  • Denina Martin
    Reply

    Hi, I think I found the solution and fixed it, so please ignore my request.

    Regards,

    D.

    • Ben Johnson
      Reply

      Sorry I didn’t see your question sooner, I hope you got everything figured out!

      Let me know if you are still having duplicate page title issues and I will do my best to point you in the right direction.

  • gaxel
    Reply

    .where can i find that header.php?

    • Ben Johnson
      Reply

      You’ll either have to login through FTP or in the back end of WordPress you can go to Appearance>Editor and find the header.php file.

  • Chris Derrer
    Reply

    I’ve edited it in the header.php and it’s still not working… any other suggestions?

    • Ben Johnson
      Reply

      You’re still getting duplicate page titles?

      Can you copy and paste the code you have in a response?

      • Chris Derrer

        I fixed it, had to delete altogether and now it just runs off my Yoast SEO plug in.

        Never had this issue before in 30+ wordpress builds… random!

  • Brannen
    Reply

    Good article. Having the same problem. Fixed the .php element and the YOAST setting. Still not having any immediate result.

    Do we need to define a SEO Title for each page in order to avoid duplication?
    Should we keep %%title%%%%page%%%%sep%%%%sitename%%?
    I would assume we would need to define one for better SEO practices…

    How long do you think would it take to see changes on the web?

    • Ben Johnson
      Reply

      I always do a custom page title for each page/post. It ensures proper page title structure and you can also verify that your titles are the correct length so they don’t get cut off on SERPs.

      You should see immediate results on your site if you made the correct changed. If you’re asking how long it will take to see changes in SERPs, you’ll have to wait for Google to find the changes and update it on their end. You can try to expedite this by re-submitting your site for indexing in Google Search Console.

      • Brannen Morton

        Thank you for the reply. I haven’t tried submitting my sitemap to Google just yet. Still developing the site. But yea, that might just help.

  • Aaron
    Reply

    Hello, I am using Sparkling Worpress theme and I cannot find the title tag in the theme editor or via FTP

    • Ben Johnson
      Reply

      Every theme as a unique file structure so I won’t be much help here since I am not familiar with that theme. I would reach out the the theme developer and tell them you are looking to edit some code in the header.php file, but you can’t find it.

      • Aaron

        Done that, apparently the theme doesn’t call the title function.

  • Prettiful Blog
    Reply

    Hi

    I have tried to edit my header.php, but it is still showing up as a duplicate

    • Ben Johnson
      Reply

      Each theme is a bit different, so I’m not exactly sure what edits you made.

      If you want to post the code from the header section I can take a quick look.

  • Roberto
    Reply

    works like a charm. Thanks!

Leave a Comment

Start typing and press Enter to search