For months, I had a goal to remove the dates from WordPress URLs (or permalinks) on my site. It seems like everyone is doing this, but nobody explains how to do it simply or easily. So I’m going to share my method. Removing the dates from WordPress URLs is a surprisingly effective way to get more traffic.
Why I was apprehensive about removing dates
When you remove the dates, it means all of your URLs change. Web servers have a way of dealing with that, called redirection. They take your old URL and translate it to the new one transparently. Search engines recognize it and they don’t penalize you for duplicate content. Eventually they improve your search rank, yet everything else still works like nothing happened, and everyone’s happy.
Redirecting made me nervous because it usually means editing .htaccess files. I run a security plugin that’s constantly editing my .htaccess file to block threats–effectively it’s using .htaccess as a simple web application firewall. It shouldn’t clobber my redirects. But if you’ve been around computer systems any length of time, you know how that goes.
I’m perfectly comfortable editing plaintext files, but I realize not everyone is.
Enter the Redirection plugin
By using the Redirection plugin, you can manage your redirects from within WordPress. The other thing Redirection does is log your 404 errors. These logs are very helpful. You can use them to watch how bad guys are trying to get into your site. Seeing a handful of people trying to hack your site every day is enlightening.
I happen to have legacy content from the days before I ran WordPress; so I had about 200 redirections in place before I decided to change my URLs. If you don’t, then this is going to be really easy.
In my case, I had to export my existing redirections, edit them to remove the dates, then reimport to avoid a redirect to a redirect. Using search and replace, it didn’t take me long.
Two steps to remove the dates from WordPress URLs
Yes, you really can remove the dates from the URLs in just two steps, which seems rather anticlimactic. If you don’t have Redirection installed, installing Redirection counts as step 0.
First, click Settings, then Permalinks. Select Post Name. Click Save changes.
Next, click Tools, then Redirection. Click Groups and create a group if you don’t have any redirects yet. Then click Redirects and scroll down to the section called Add New Redirection.
Under Source URL, enter the following if your dates are just the year and month:
If your dates are the full date, enter this under Source URL instead:
Be sure to check the box next to Regular Expression.
Under Destination URL, enter your URL followed by /$3 — here’s mine:
If you don’t use https, I recommend you start, but in the meantime, use something like this for your Destination URL instead:
Leave the fields labeled Match and Action alone. Pick your group, then click Add Redirection.
Here’s what it looks like in the user interface:
Again, make sure you enter your URL, not mine. You and your readers don’t want your traffic going to me.
That’s it. Your mission to remove the dates from WordPress URLs is done. Visit your site and click around a bit to make sure everything works. Navigate back to Tools -> Redirection -> 404s and look for errors just to make sure.
Change your permalink structure
There’s one more step. After you add redirects for your existing content, you need to change your permalink settings. Navigate to Settings > Permalinks and choose Post Name instead of Day and Name or Month and Name.
Your backout plan
Always have a backout plan. If anything goes wrong, click Settings, then Permalinks. Select Month and Name. Click Save Changes.
Click Tools, then Redirection. Scroll to the redirection you created above, then hover under it and click Disable. Then navigate to Settings > Permalinks and change Post Name back to Day and Name or Month and Name, whichever you were using before. Now your blog is back in the state you began with.
Why remove the dates?
OK, now we can talk theoretical stuff. If you’re not interested, just skip the rest of this entry and go back to what you were doing.
SEO experts recommend removing the dates from your URLs. There was a time when having them helped. Today, some experts believe having the dates penalizes you unless you’re a news site. At the very least, the year and month are taking up valuable space in the middle of the URL, pushing the important search terms further in the back.
I look at the search queries people use to find my site, because I want to know if I answered people’s questions. I can tell you I rarely see a year in a search query, and I can’t tell you the last time I saw a month. So why put something so unimportant up front in the URL? There’s no reason, except it’s a trick that helped in 2005. As someone who was blogging in 2005 and now, I can tell you most of what helped in 2005 doesn’t help you anymore.
Playing the SEO game
I wrote off the effects of SEO (search engine optimization) until I saw the effects of modern SEO firsthand. Modern SEO is a lot harder to game than it was in years past.
SEO extends on what they teach professional writers in school. When I was in journalism school, they taught us to use the first paragraph to hook in a reader, and to use the last paragraph to wrap everything up. In between, you inform the reader, tell a story, solve a problem, and make the reader want to keep reading. That part of writing will never be obsolete.
But there are some tricks you need to do to get search engines to get you a reader. Changing your URL structure is one of them. I may also interject one sentence in the first paragraph that’s designed for the search engine. My former professors, instructors and teachers would bristle at some of those lines, but without them, I might not get that click. Today you have to hook the search engine and the reader. I use the rest of that paragraph trying to hook the reader. If they don’t bounce right back to the search engine, the engines notice, they rank me a bit higher, and the cycle starts all over again.
It’s an inexact science, and I don’t claim to have mastered it. But I’m in the game.