Dr Adil Ramzan
asked 9 years ago

Hello DW
Thanks for this awesome plugin.
There is a problem.
question category urls give duplicate title tag error in webmasters.
for example
http://www.askwebdr.com/medical-questions/category/abdominal-problems/
this is a category url. its title is same as that of the homepage. so it gives duplicate title tag error. the title of this url should be the name of the category. you can check it bing.com or google.com results by pasting this url in google or bing search.
I have tried yoast plugin to no index category pages but they are still indexed. can we fix this? Moreover i want to show related questions below the question, how can i do this?
Best Regards 🙂

1 Answers
DominicStaff
answered 9 years ago

Here’s how I fixed the duplicate title tags issue for those posts/ questions.

Step 1 – Configure Yoast WordPress SEO Plugin

First off, in your WordPress Admin dashboard, navigate to SEO > Titles & Metas and click Post Types tab. As shown below, for Title Template use %%title%% %%page%% %%sep%% %%sitename%%, and for Meta Description Template use %%excerpt%% %%page%%, and click Save for the changes to come in to effect.
http://prntscr.com/9b9e2u

Step 2- Configure Your Theme’s Functions.php

Now open your theme’s Functions.php (you may need an FTP client like FileZila for that) and add the following code block into this file. The functions.php file is located in the theme folder i.e wp-content/themes/YourThemeName.

/** Add Page Number to Meta Description to avoid Duplication **/
if ( ! function_exists( 't5_add_page_number' ) )
{
function t5_add_page_number( $s )
{
global $page;
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
! empty ( $page ) && 1 < $page && $paged = $page;

$paged > 1 && $s .= ' - ' . sprintf( __( 'Page %s' ), $paged );

return $s;
}
add_filter( 'wpseo_metadesc', 't5_add_page_number', 100, 1 );
}

Step 3 – Find The Post That Needs To Be Fixed

Open Google Webmaster Tools and navigate to Search Appearance > HTML Improvements from the left side bar. The tool will highlight the number of Duplicate title tags you have.
http://prntscr.com/9b9eah

Here you will see a series of topics that have duplicate title tags. You can click on the problematic post title to see the effected URLs. The example below shows many multi page posts that have the same title.
http://prntscr.com/9b9efe

Step 4 – Search The Post In WordPress and Fix It

The next step is to fix that post in WordPress. Open that problematic post in WordPress editor, scroll down to WordPress SEO by Yoast setting. If you manually entered its SEO Title just remove it and leave this space blank (in the example below, 17 Insanely Cool Logo Designs Of Popular Tech Brands is the SEO Title).

You can also optionally specify a meta description, and click Update to save your changes. And that’s it, you will no longer encounter the Duplicate Title tags error for that post in Google Webmaster Tools because the page number will automatically added to its title and meta description, generating unique tags for each page.
http://prntscr.com/9b9ei7

It may take Google several days to recrawl your pages and fix Duplicate title tags for those paginated posts. I recommend that you resubmit your sitemap in Google Webmaster Tools to request a reindex of your site’s content.

About the related posts, I think, I have fixed it in the previous question.
Please send me username & password of your site, I will check and help you resolve it.
Regards,

dradil
replied 9 years ago

Thank you. Problem is being solved i think.

Powered by DW Question & Answer Pro