Remove Dates From Permalink

How do you you remove the dates from your permalink structure without ruining all the hard earned links you have developed?

Glad you asked… It really is very simple… (Note I tried the various plugins first but had issues… In the end this solution is faster for the visitor, quicker to implement, and simpler.)

Assuming your current permalink structure is /%year%/%monthnum%/%day%/%postname%/

  1. First change your permalink structure to /%postname%/
  2. Create a .htaccess file (or modify an existing file)
  3. Add this line above any other WordPress declarations: RedirectMatch 301 /dddd/dd/dd/(.*) /$1
  4. Make sure the .htaccess file is in the root of your blog

Here is an example .htaccess file direct from one of my blogs…
RedirectMatch 301 /dddd/dd/dd/(.*) /$1

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

By 301 redirecting you are telling the search engines that the content has moved to a new location. While there is typically some drop off during the transition, your blog will come back stronger for making the change.

As an example of the effectiveness…
Here is an old url: http://www.golfballdriver.com/2008/03/18/michelle-wie-and-robin-lopez-at-charity-auction-pic/
which now redirects to the new url: http://www.golfballdriver.com/michelle-wie-and-robin-lopez-at-charity-auction-pic/

Originally posted 2009-02-02 12:30:17. Republished by Blog Post Promoter

Blog Traffic Exchange Related Posts
  • peopleSEO Tips for Bloggers on WordPress There are several million WordPress blogs that you can find on the internet, but unfortunately the majority of them are not properly optimized for search engines. This article is going to touch on some SEO tips for bloggers using WordPress to host their blog, because with the right tips it......
  • wordpresshostComparing WordPress Hosting Wordpress has created an incredible opportunity for those who are looking to take control of their future. It has provided the entire world with a system and service that simplifies web ownership. Users can create blogs and content quickly and easily, opening up broad possibilities for the greater population. Anyone......
  • OPP OptionsOld Post Promoter "You down with OPP, yeah you know me!" The OPP, or Old Post Promoter, is a plugin designed for Wordpress by the Blog Traffic Exchange. The primary function of the plugin is its capability to promote older blog posts by reviving them and returning them to the front page and......
  • popularity5 Tips for Popular Blog Posts The internet may be a fast paced environment, but there are some blog strategies that remain the name even when it becomes harder and harder for average bloggers to keep up. Here is a reminder of some of the tips that don't change when it comes to blogging. When posting,......
  • wp1Installing a WordPress Blog If you want to install WordPress on your own server, the first step is to download the necessary files from the website at WordPress.org download. Next, you will use an FTP program to upload the files to your host site. If you use Cpanel, you can use Fantastico in order......
Blog Traffic Exchange Related Websites
  • goo.gl_yqlgoo.gl URL Shortener Bookmarklet via YQL Last month we saw a new Google URL shortening service that will be used for Feedburner and the Google Toolbar. It wasn't long before the URL shortening code in the toolbar was dissected, and subsequent APIs developed. I managed to put together my own by using YQL. YQL is a......
  • blog traffic exchangeProfessional Blogging Roundup - Don't Get Sloppy This Season Instead Get Busy! This list is full of dynamite bloggers. Every link is worth investigating. Get to it! Corporate Investors.com writes Blogging Up A Storm For Customers' Sake. Centers on two corporate giants Dell and Southwest Airlines. Business Week intones Blogs Keep a Company Death Watch. Daily Blogging Tips says 70% Think That......
  • How to Set Up a Self-Hosted WordPress Blog in 8 Easy StepsHow to Set Up a Self-Hosted WordPress Blog in 8 Easy Steps   If you want to set up a blog, the choice of the pros is WordPress. That’s because: WordPress is free, open source software There are a huge range of free themes available There are a huge range of free plugins available There is loads of free online advice......
  • TaxExtension.comTax Extension- Individual About taxextension.com Authorized IRS e-file Provider taxextension.com is an an Authorized IRS e-file Provider offering tax extension preparation and electronic filing services to consumers and businesses. Ficticious Name and Corporate Ownership Efile IRS Tax Extension Online taxextension.com is owned by BH Enterprises of FL, Inc. We do business in......
  • blog traffic exchangeSunday Roundup: Blogging Tips and Resources Good morning Sunday readers! Are you looking for some blogging tips to help out your blog or thinking of starting one? Check out our quick guide below to some great places for ideas and resources. General: Marketing 2.0 asks Corporate Blogger: Angel or Demon? For a humorous look at Thoughts......
Online Stores If you liked this article, vote for it on del.icio.us and stumbleupon.



Categories:

Blog Tips



Tags:

, , , , ,


8 comments ↓
#1 Brad Hart @ A DoFollow Blog on 12.11.08 at 11:09 am

I have long been a proponent of using /%category%/%post-slug%/ for your permalink it not only adds a searchable keyword if you did your categories right, but only using the post slug can often times cause plugin errors with some of the more popular plugins.

I also recommend leaving the htaccess file alone unless you really know what you are doing. I also find it easier to use the redirection plugin since often times you will want or need to optimize a post slug or a lot of post slugs depending on the age of your blog. Even if it isn’t that old removing the trash words that get stuck in by default is a good SEO practice.

#2 kevin on 12.11.08 at 11:27 am

I tend to use more than one category and so I end up with a lot of posts in the categories with that start with letter earlier in the alphabet.

I have never had any toruble with just using the post slug.

#3 MLR on 05.21.09 at 7:43 pm

Currently I use:
/%year%/%monthnum%/%postname%/

I think I want to change it to:
/%postID%/%postname%/

What would the htaccess look like for that? And would that be just as good for SEO as your improvement?

#4 Levon on 03.20.10 at 3:01 pm

If I want to use:
/%postID%/%postname%/

What would the .htaccess code be?

#5 John on 07.13.10 at 12:58 pm

I’m new to redirects, and wasn’t able to get it to work with the example above until I reliezed that the “dddd” and “dd” need to be regular expressions.

Here’s what I used and it worked

RedirectMatch 301 /[0-9]{4}/[0-9]{2}/([^/]+)/ /$1/

#6 Jim Kitzmiller on 09.04.10 at 3:01 pm

John,

The regular expression version worked for me. Thank you.

Jim

#7 Larry James on 10.27.10 at 7:43 pm

I has been my understanding that while /%category%/%postname% is perhaps the most search engine friendly url, it is not the best option for performance. I use/%postID%/%postname%/ because I have learned that it is best to start your permalink structure with a number, such as the year or post ID.

#8 TJ on 07.12.11 at 2:16 pm

This regex will work for sites that had been using the
/%year%/%monthnum%/%day%/%postname%/ structure. It is also tolerant of WordPress installs in subdirectories of the docroot – like http://www.foo.com/pub/myblog/1999/11/11/my-awesome-post/
RedirectMatch 301 (/[^/]+)?/\d{4}/(\d{2}/){2}(.*) $1/$3

Leave a Comment