Best way to remove year from url of old post.

Joined
Jun 2, 2022
Messages
61
Likes
55
Degree
0
Hi, I'm updating some of my old blog posts from last year (like Best X of 2021).

I was stupid enough to put the year 2021 in the url of some of the blog posts (newbie mistake).
Now I'm updating the posts to 2022, and I want to remove the year from the urls so it doesn't look outdated.

What's the best way to get the year 2021 out of the urls, so it just reads: Example.com/best-x

I think it would be to create a new page with the new url, and then redirect the old post to it.
Is this correct?

If so, what's the easiest way to do it, especially since I'll be doing it for multiple posts?
Is there a way to simply duplicate the post, or do I copy and paste the page to a new page. (Does Ctrl+A to select all text at once and copy it do the job satisfactorily? I doubt as it may leave out things like image alt texts and other stuff.)

And what's the best way for a newbie to setup 301 redirection of the old url to the new url. (I know nothing about coding currently, though plan to learn, so I'll prefer a plugin if possible).
Is there any common plugin that handles redirects well?
I use Yoast and Really Simple SSL, does any of these handle it?

Thanks.

PS:
I'll be asking a lot of newbie questions this period as I'm doing a lot to reactivate the site now, and a lot of this is pretty much new terrain to me.
And many times, Google isn't very helpful with their blanket "one size fits all" search results, especially when you're searching for specific things.
So I crave your indulgences and apologize in advance for the many questions and threads I may be creating going forward, as I try to learn as much as I can.
 
If you're sure you don't have duplicate posts when doing this, I'd start by making a complete backup of the site files and database, then I'd change the permalink structure to "post name". For the 301, ideally you want to do this on the webserver level (.htaccess or vhost config) if possible but that's not necessarily ideal for those that don't work with servers like Apache/OpenLitespeed. The most popular plugin I see in the wild with clients is the "Redirection" plugin here: https://wordpress.org/plugins/redirection/ You'd could probably solve the redirect with a single regex that matches for the 4 digit year and does a 301 to just the post name at the end.
 
I'd start by making a complete backup of the site files and database, then I'd change the permalink structure to "post name".
I had already set the permalink structure to "post name" from the moment I created the site 2 years ago.
It's just that in some of the roundup affiliate review posts, like "Best X product 2021" posts, I had included the year 2021 in the url, thinking it could help it rank better for searches that included the year.
That would be about 6-10 posts out of the 70+ posts on the site.
So I'm looking for the best way to fix those ones.


The most popular plugin I see in the wild with clients is the "Redirection" plugin here: https://wordpress.org/plugins/redirection/ You'd could probably solve the redirect with a single regex that matches for the 4 digit year and does a 301 to just the post name at the end.
Thanks, I had also seen the Redirection plugin mentioned when I browsed about it.
Was wondering if any of the plugins I already had installed could handle it, (Yoast and Really Simple SSL), to avoid having to install another plugin if possible.
Aim is to minimize chances of plugin conflicts after updates. Since I'm not very code-savvy, I'm trying to keep installed plugins to a minimum, so I have less chances of one giving me headaches after an update.
But if the ones I have can't do it, I'll definitely prefer going with the Redirection plugin than having to deal with editing code.
 
Just retitle the page and don't worry about the URL. The date might be there but most browsers nowadays just shows the domain name. If they don't, I don't expect many readers to read the URL string either. If they do, they'll conclude that the post was updated for the year. Duh. Don't be embarrassed about that and move on.
 
Just retitle the page and don't worry about the URL. The date might be there but most browsers nowadays just shows the domain name. If they don't, I don't expect many readers to read the URL string either. If they do, they'll conclude that the post was updated for the year. Duh. Don't be embarrassed about that and move on.
That sounds very appealing.
That's the definition of KISS....as simple as possible. And I love simple solutions, lol.
However, I thought having an outdated year in the url can negatively impact rankings, compared to not having a year in the url.
So my worry is not just about the readers seeing the url, it's more about Google giving it a lower rank in the SERPs because it has an outdated year in the url. (Compared to other sites that don't have the year in their url).

Don't you think this could be an issue?
 
That sounds very appealing.
That's the definition of KISS....as simple as possible. And I love simple solutions, lol.
However, I thought having an outdated year in the url can negatively impact rankings, compared to not having a year in the url.
So my worry is not just about the readers seeing the url, it's more about Google giving it a lower rank in the SERPs because it has an outdated year in the url. (Compared to other sites that don't have the year in their url).

Don't you think this could be an issue?
You're thinking too much about it and it is not an issue. URL strings have random stuff like ?s=KSY203 in them all the time. Focus more on big picture things. You're focusing on stuff that makes no difference for the bottom line, which is to sell at a high multiplier and with a high trailing revenue/month or to grow the company to make it a small/medium size business. This focus on the query is just nerd talk.
 
If you're using Wordpress (sounds like you are) it keeps track of the post ID's in combination with the slugs. So if you have /best-toasters-2011/ and change it to /best-toasters/ you don't need to do anything. Wordpress will automatically set up a PHP-based redirect for you. No need to track the redirects in a plugin or htaccess file or anything. Though I'd at least keep a record of it in a spreadsheet so you can confirm the redirect is in place every 6 months or whatever.
 
Thanks, I had also seen the Redirection plugin mentioned when I browsed about it.
Was wondering if any of the plugins I already had installed could handle it, (Yoast and Really Simple SSL), to avoid having to install another plugin if possible.
It may be possible but it's almost always a good idea with just about anything to avoid the "all in one" line of thinking and cherry pick the best tools for the job. I can use a brick to drive a nail and it "just works" and "gets the job done" but unless I'm in a place where there are nothing but bricks, I'm going to find a hammer and preferably a nail gun, every single time.

With that said, I'd recommend using the Redirection plugin and put all redirects there. There will never be a question of "what's up with this redirect? did the plugin fail?".
 
You're thinking too much about it and it is not an issue. URL strings have random stuff like ?s=KSY203 in them all the time. Focus more on big picture things.
I actually tend to overthink things quite a lot, it's one of my major challenges. I'm actively trying to stop that (trying to find a balance, without going completely wild and carefree thereby making silly mistakes).
Thanks for the brain-resetting gentle reminder.

So if you have /best-toasters-2011/ and change it to /best-toasters/ you don't need to do anything. Wordpress will automatically set up a PHP-based redirect for you. No need to track the redirects in a plugin or htaccess file or anything
Wow, had no idea this could happen automatically.
Researched it further after you pointed it out, found it's true, just not talked about often on most sites, as it seems most people don't realize this.
Though it only works for posts (which is exactly what I need it for, thanks), and does not work for pages and taxonomies, or when you're changing permalink structure, as far as I found in my research.
Just pointing this out to add flesh to the topic, for the sake of other newbies like me in future who may have similar issues or questions.

But it works excellently for what I want to use it for (simply changing the url slug of existing posts).

Many thanks for this.

Please, for the sake of my education,
Is there any drawback to doing this (eg reducing page speed, failed redirects occasionally, etc).

Any benefits of doing this vs using a plugin, or any risks of doing this vs using the redirection plugin?

I didn't see any major differences when I looked it up, (other than the fact that using a plugin arranges and categorizes the redirects it all in one place, and can do redirects for pages and taxonomies). Seems like it's basically just different ways of doing the same thing.
Just asking in case you're aware of any significant differences other than what I've mentioned above, from your wealth of knowledge and experience...just for my education.

Thanks a bunch Ryuzaki, you've been very helpful and supportive in your responses in my many questions across other threads.
Just to say once again I appreciate them all!
Maybe when my hobby site I'm reactivating takes off again and is soaring high I'll buy you a Lambo as a gift, lol.

It may be possible but it's almost always a good idea with just about anything to avoid the "all in one" line of thinking and cherry pick the best tools for the job. I can use a brick to drive a nail and it "just works" and "gets the job done" but unless I'm in a place where there are nothing but bricks, I'm going to find a hammer and preferably a nail gun, every single time.

With that said, I'd recommend using the Redirection plugin and put all redirects there. There will never be a question of "what's up with this redirect? did the plugin fail?".
Thanks for clarifying.
I'll be going with Ryuzaki's suggestion of simply editing the url and letting wordpress take care of the redirect, and keeping it documented somewhere in a spreadsheet. Especially as the urls are not many, (6-7 posts).
Since it's the simplest to do (takes literally few seconds), and avoids having to install a plugin for now.

But I'll definitely keep the Redirection plugin handy for if I need to redirect pages or taxonomies at any point, (or if I ever have any reason to change permalink structure, though I doubt that), as it will surely come in very handy then.
Thanks a lot for your suggestion and clarifications...they helped me gain clarity.
 
Is there any drawback to doing this (eg reducing page speed, failed redirects occasionally, etc).

Any benefits of doing this vs using a plugin, or any risks of doing this vs using the redirection plugin?
I'd say the only differences are:
  • Speed: the difference is negligible, but there. Redirects in the htaccess file will be faster but it's literally negligible and makes no real world difference. It's basically "before PHP execution or after", and you'll be using caching so it won't matter enough.
  • Tracking: using the htaccess file or a plugin helps you keep track of your past redirects so you can test them periodically. But a spreadsheet solves this.
  • Security: one less plugin is always a good thing in terms of vulnerabilities. You never know when a bug is introduced or found to have been existing forever.
Good call on the pages & taxonomy. I'm glad you pointed that out. And you're welcome, glad to help out any serious webmaster, Lambo (hopefully) or not!
 
Back