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.

New Call-to-action

Showing 31 comments
  • Mickey

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

    Here is my header



    * 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

      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

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

  • Eduardo

    Thank you so much, it worked 🙂

  • Jana

    Thank you. You helped a lot! 🙂

  • Denina Martin

    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

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



    • Ben Johnson

      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

    .where can i find that header.php?

    • Ben Johnson

      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

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

    • Ben Johnson

      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

    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

      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

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

    • Ben Johnson

      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


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

    • Ben Johnson

      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

    works like a charm. Thanks!

  • Ron

    Thank you Ben! That solved my problem too.

  • dev

    it worked. thanks.

  • Josh

    It workeeeeed! Thank youuu! 😀

  • eka

    It’s worked for me. Thank you very much.

  • Sushant

    Thanks for the tip. Wasted hours searching for right solution but got it right after visiting the website.

  • Agustina

    Dear Ben,
    I have my site titles duplicated.
    Here is my code. Could you please tell me which part should I change?

    // Print the tag based on what is being viewed.
    global $page, $paged;

    wp_title( ‘|’, true, ‘right’ );

    // Add the blog name.
    bloginfo( ‘name’ );

    // Add the blog description for the home/front page.
    $site_description = get_bloginfo( ‘description’, ‘display’ );
    if ( $site_description && ( is_home() || is_front_page() ) )
    echo ” | $site_description”;

    // Add a page number if necessary:
    if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
    echo esc_html( ‘ | ‘ . sprintf( __( ‘Page %s’, ‘twentyeleven’ ), max( $paged, $page ) ) );


    Best regards,

    • Ben Johnson

      Try changing wp_title( ‘|’, true, ‘right’ ); to wp_title('');

  • M Sabir

    Hello Sir i unable to do this i have Yoast SEO but in new version i could not find any option..
    Title show like this
    example : CHILL DEAR – Online Chat rooms without Registration
    but i want like this:
    Example: CHILL DEAR Online Chat rooms without Registration
    I dont want dash ( – ) in middle. so how to fix it

    • Ben Johnson

      This is unrelated to this topic.


      There are 2 places you can change this.

      1. Under Yaost options, go to Titles and Metas. Here you can select a custom separator. However, you will have to select some symbol. You can’t have it be blank or no separator.

      2. Probably your best option is going to be to go to the page that you want to change the page title and simply delete the default title that has the separator and add the page title of your choosing.

      Hope this helps.

Leave a Comment

Start typing and press Enter to search