Yoast SEO
[resolved] [Plugin: WordPress SEO by Yoast] De-Indexing Old Date Based Archives (2 posts)

  1. montanoj
    Posted 4 years ago #

    I used to have URLs that included the date like this: http://mysite.com/2008/03/thissite.html. Two years ago, I have change the URL structure to exclude the date like this: http://mysite.com/thissite.html

    My problem now is that since February 2012, Google Webmaster Tools is showing thousands of 404 errors for my site and these are all for my old URLs that had dates in them.

    I'm wondering now whether disabling (by checking) the "date-based archives" in the WordPress SEO plug-in will tell Google to stop including my previous dated URLs in its index.

    I was told that this problem can be solved by adding some noindex robotxt in the htaccess file but I don't know how this is done and I was warned not to do anything with the htaccess file if I don't know what I'm doing.

    Thanks from a newbie.


  2. Joost de Valk
    Plugin Author

    Posted 4 years ago #

    No that won't fix it. What you should do is add the following rewrite to your .htaccess file:

    RedirectMatch /\d{4}/\d{2}/(.*) http://mysite.com/$1

    Be sure to replace mysite.com with your actual domain.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic