Imagine you’ve written an evergreen pillar article full of timeless tips and keep it regularly updated. But the year you originally published the post is clearly visible in its URL.
When you include the date in your post URLs, your content can feel outdated even if the content is fresh. This happens when you choose a permalink format that adds the date to your post URLs.
In this article, we will show you how to easily remove the date from your WordPress URLs, giving your content cleaner, more evergreen links that are both user-friendly and good for SEO.
Why Dates Appear in WordPress URLs
By default, WordPress uses a non-human-readable link structure for post and page URLs, which looks like this:
https://example.com/?p=123
This uses the post ID in the URL, which doesn’t look good and isn’t very meaningful.
Luckily, the WordPress Settings » Permalinks page lets you easily change these default links to something more meaningful and SEO-friendly.
Some WordPress users choose the ‘Month and name’ or ‘Day and name’ options. These add date parameters to your WordPress URLs.
‘Day and name’ permalinks include the year, month, and day like this:
https://example.com/2023/09/03/sample-post/
‘Month and name’ permalinks include the year and month:
https://example.com/2023/09/sample-post/
These URLs are better than the default ugly URLs, and they are SEO-friendly as well. However, they are unnecessarily long, and in time, the dates will make your articles look old.
That’s why a lot of users prefer the ‘Post name’ URL structure instead. This removes the date and just uses the post slug keyword in the URL.
‘Post name’ permalinks don’t include any date information in the URL:
https://example.com/sample-post/
This URL structure is shorter, meaningful, SEO friendly, and won’t look dated.
Considerations Before Removing the Date From WordPress URLs
If you are starting a new WordPress blog and haven’t launched it yet, then it is safe to remove the date from WordPress URLs.
However, if your website has been around for some time, then there are a few things you should keep in mind.
Changing the URL structure may result in 404 errors for your users and search engines. This means you might see warnings and errors in your Google Search Console reports.
Plus, your search engine rankings may be affected since backlinks to your old articles will also now lead to 404 errors.
Both of these issues can be fixed by setting up redirects, and we will show you how to do that later in this article.
Changing the URL structure will also reset your social share counts. Unfortunately, most social share count services do not track redirected URLs and will reset the counts.
Removing the Date From WordPress URLs
First, you need to create a complete WordPress backup of your website. This will allow you to restore your website to an earlier stage in case things don’t work out as you expected.
After that, you need to visit the Settings » Permalinks page and choose ‘Post name’ as your permalink option.
Don’t forget to click on the ‘Save Changes’ button at the bottom of the page to store your changes.
WordPress will now remove the date from your WordPress URLs and only use the post name. It will do this both for your existing posts and pages and those you will add in the future.
Setting Up Redirects to Preserve SEO Rankings
Now that you have removed the date from your WordPress URLs, you will need to set up proper 301 redirects. As we said, this will stop your users from seeing 404 error messages when they follow an old link.
These redirects will send users to the updated URLs without showing a 404 error. This will also help search engines understand that the old URLs have been moved to the new URLs.
We will cover 2 methods you can use to create 301 redirects in WordPress:
Method 1: Setting Up Redirects Using AIOSEO (Recommended)
The best way to set up redirects is using the All in One SEO (AIOSEO) plugin. That’s because it includes a powerful Redirection Manager feature that lets you create bulk 301 redirects as well as automatic redirects, full site redirects, 404 error tracking, and more.
Note: You will need AIOSEO Pro to use the redirection manager. There is also a free version of AIOSEO, but it doesn’t include 301 redirects.
First, you need to install and configure the AIOSEO Pro plugin on your website. For more information, please refer to our step-by-step guide on how to set up All in One SEO correctly.
Once the plugin is active, you will need to go to All in One SEO » Redirects in your WordPress dashboard and then click the ‘Activate Redirects’ button.
You’ll now see the ‘Redirects’ tab in All in One SEO, where you can add your first redirect.
On this page, you will see settings where you can enter a ‘Source URL’ and ‘Target URL’.
The source URL will describe the old URL permalink structure, and the target URL will describe the new post URL permalink you need to redirect to.
To do this, we will use regular expressions, which are also known as Regex. Regular expressions provide a powerful and flexible way to search and manipulate specific patterns of characters. We will use them to match the permalink pattern in the URLs we need to redirect.
If you were previously using ‘Day and name’ permalinks, then you need to enter these Regex expressions into the source and target fields:
- Source URL:
^/(\d*)/(\d*)/(\d*)/([A-Za-z0-9-*])
- Target URL:
/$4
You will also need to click the cog icon next to the source URL to display three checkboxes. Make sure that only the ‘Regex’ box is checked. This option will enable regular expressions in the source and destination fields.
However, if you were using ‘Month and name’ permalinks, then you will need to enter these Regex values instead:
- Source URL:
^
/(\d*)/(\d*)/([A-Za-z0-9-*]) - Target URL:
/$3
Once you have added the source and target URL values, you should make sure that the Redirect Type is ‘301 Moved Permanently’ and then click the ‘Add Redirect’ button.
Your redirect will be created. Now, if a user clicks on a link that uses your old permalink structure, then they will be automatically redirected to the correct post using the new name-based URL.
You can see your redirect by scrolling down to the logs section. You can see how many website visitors have been redirected in the ‘Hits’ column, and you can enable or disable the redirect using the ‘Enabled’ toggle.
Method 2: Setting Up Redirects Using Redirection (Free)
You can choose our second method if you prefer to use a free plugin.
First, you need to install and activate the Redirection plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, you need to visit Tools » Redirection and click on the ‘Start Setup’ button.
The plugin will then show you a couple of options. It can automatically detect and alert you if a post’s URL is changed and keep a log of redirects.
You can also leave both these options unchecked and simply click the ‘Continue’ button.
The plugin will then run some tests, and if everything looks good, then you can click on the ‘Finish Setup’ button followed by the ‘Ready to begin!’ button. The plugin settings will be stored in the WordPress database.
You will now see the plugin’s settings page. From here, you need to click the ‘Add New’ button at the top of the page or simply scroll down to the ‘Add new redirection’ section.
You will see a form with ‘Source URL’ and ‘Target URL’ fields. The source URL will describe the old URL structure, and the target URL will describe the new URLs.
If you were using the ‘Day and name’ permalinks, then you will enter the following values in the source and target fields:
- Source URL:
/(\d*)/(\d*)/(\d*)/([A-Za-z0-9-*])
- Target URL:
/$4
If you were using ‘Month and name’ permalinks, then you will enter the following values:
- Source URL:
/(\d*)/(\d*)/([A-Za-z0-9-*])
- Target URL:
/$3
Don’t forget to select ‘Regex’ from the drop-down menu before you click the ‘Add Redirect’ button to save your changes.
The plugin will now redirect users to your new name-based URLs.
Expert Guides on URLs in WordPress
We hope this article helped you learn how to easily remove the date from WordPress URLs. You may also want to see some other articles related to URLs in WordPress:
- Glossary: URL
- What is a Website URL (Important Parts Explained for Beginners)
- What is a SEO Friendly URL Structure in WordPress
- How to Change Your WordPress Site URLs (Step by Step)
- How to Create Custom Permalinks in WordPress (Ultimate Guide)
- How to Remove Numbers From WordPress URLs
- How to Remove v=XXXX String From WordPress URLs
- How to Get Rid of /wordpress/ From your WordPress Site URL
- How to Include Category and Subcategory in WordPress URLs
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Olaf
Simply removing the date seems easy with a few clicks, and WordPress handles the rest perfectly. However, it’s good to read these tutorials in advance, as many people, especially at the beginning, don’t realize that this can significantly harm a website, especially one that already has some reputation on Google and is indexed. Changing the URL can end up doing more harm than good. It’s helpful to show people how to do it correctly and how to account for SEO and already indexed pages. It’s important that people don’t blindly try to change URLs, only to be surprised when their traffic suddenly drops, which can really happen.
Dennis Muthomi
these are really helpful tips for removing dates from WordPress URLs!
I’m curious about one scenario though. For news or media sites where the content is very time-sensitive, would you still recommend removing the dates from URLs? In those cases, having the publication date right in the URL could give readers valuable context about how recent or relevant an article is. I’d be interested to hear the author’s thoughts on whether it’s better to keep or remove dates for those types of websites
WPBeginner Support
We still recommend not having the date in your URL for SEO.
Admin
Dennis Muthomi
I’ll take your recommendation and stick to that, thanks mate!
Jiří Vaněk
Regarding news websites, I think the date in the URL of an article is not relevant because news websites often update their articles, and the date in the URL may not provide any relevant value. In my opinion, from a user perspective, it is very important to display the date within the article because that’s where the vast majority of users will look for it. I also look for dates within the article, not in the URL. A great example is wpbeginner. They have articles from 2020 that are updated with new information in 2024. In this case, the date in the URL would have no value, and the URL would need to be updated every time the article is supplemented, which does not have a positive impact on SEO.
THANKGOD JONATHAN
Removing dates from WordPress URLs is easier compared to Google Blogger platform. This is a game-changer for clean and SEO-friendly permalinks. Thanks for the tip, WPBeginner!
Ralph
Having dates in URLs is problematic for SEO and users I think. You can write “best X guide 2020” and have such url. Even if you update its content every year, the url stays the same. Good thing you can change it so easily. Just remember about redirecting.
WPBeginner Support
Redirecting is very important to prevent SEO and user issues in case anyone bookmarked the old post
Admin
Jiří Vaněk
Thank you for the guide. When I launched my blog on my own domain, unfortunately, I left the date in the URL. Now I have 1200 articles on the website, and I’ve been postponing the URL change. At least I know where to look if I decide to tackle that.
WPBeginner Support
We hope our redirection recommendations help simplify the process for you
Admin
Jiří Vaněk
Definitely yes. In the end, everything was solved using AIO SEO in the PRO plan. Now all we have to do is wait how it will look in the Google Search console and how it will all develop in the end.
Uomo Malazant
There is no permalinks under the settings tab
WPBeginner Support
If you do not see permalinks there then it is likely that you are either not an admin user or on WordPress.com. If you are n WordPress.com then we would recommend taking a look at our article below that explains the differences between WordPress.com and WordPress.org.
https://www.wpbeginner.com/beginners-guide/self-hosted-wordpress-org-vs-free-wordpress-com-infograph/
Admin
Akash
Why did you use $4 in the target URL? What’s the purpose of that? I’m not able to understand that. Please explain.
WPBeginner Support
The $4 tells the code to replace the url using the text after the 4th /
Admin
Karen Mazza
Thank you for this article! Regex is not my specialty :).
Wondering if you can help. I’m redirecting 1604 blog posts with date in URL.
What’s the regex for changing
/blog/year/month/day/post-title
to
/blog/post-title
Thank you!
WPBeginner Support
You would want to use the code from this article for the ‘Day and name’ section as that is what that permalink setup is for
Admin
Angie
Hi! My blog has been around FOR YEARS, so my question is, is it possible to remove the date of the URL for upcoming blog post WITHOUT changing the old ones?
WPBeginner Support
For the moment we do not have a beginner friendly method for setting that kind of permalink up. The redirects we cover in this guide would redirect anyone attempting to visit your posts using your old URL structure if you change your permalinks.
Admin
Angie
Thank you for your answer!
Gabrielle Sales
Ahhh this was super helpful and worked perfectly! Your directions were so clear, thank you so much for this guide. It had bothered me for a longggg time seeing the dates in the URLs but I was always scared to make the move until I saw how hassle-free it is to not have to go and update URLs, especially if you’re using Pinterest and referring to a lot of other links in other places.
WPBeginner Support
Glad our guide was helpful!
Admin
Diego
Is it advisable to do it on a website that is 10 years old?
WPBeginner Support
You can do that if you would like, you would want to ensure all of your redirects work as the most important thing when updating your URLs.
Admin
Mary
Thank you, you guys really my saviours
WPBeginner Support
You’re welcome, glad our guide was helpful!
Admin
Onyekachi Emmanuel
I think this helped a bit. Thank you wpbeginner.
WPBeginner Support
You’re welcome!
Admin
Joan Ekere
After setting the redirects will my site still be seen by search engines?
Is there a possibility that it will later affect rankings?
WPBeginner Support
Your site would still be seen by search engines and your rankings should not be affected by the permalink change if you’ve set up redirects.
Admin
Mahmoud SRDAR
Hello
Thank you so much
I have a question
how to add .html to this code /(\d*)/(\d*)/([A-Za-z0-9-*]) ?
i want to remove month and name and .html
Thank you
WPBeginner Support
You should be able to use /(\d*)/(\d*)/([A-Za-z0-9-*])\.html
Admin
Giovana Q
Thank you so much, I’ve been trying to do this for a while now!
WPBeginner Support
Glad our article was helpful
Admin
Jack
Very helpful! I assumed I was stuck after writing a couple of dozen posts with dates in the URL but this worked and was incredibly easy! Thanks a lot
WPBeginner Support
Glad our guide was helpful!
Admin
Neel
I am using the post name permalink structure since beginning. I do change the permalink structure whenever I work on new WordPress installation to the postname type so that from the beginning itself the site becomes SEO friendly and links human readable.
WPBeginner Support
Glad you find the permalink structure helpful
Admin