Do you want to remove the date from your WordPress URLs?
WordPress comes with an SEO-friendly URL structure. This includes several link formats, including one that adds dates to your WordPress post URLs.
In this article, we will show you how to easily remove the date from your WordPress URLs.

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:
https://example.com/2022/09/03/sample-post/
Month and name:
https://example.com/2022/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:
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 may see warnings and errors in your Google Search Console reports.
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.
Video Tutorial
If you’d prefer written instructions, just keep reading.
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 to store your changes.
WordPress will now remove the date from your WordPress URLs and only use the post name.
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 redirects.
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.
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 on the ‘Continue Setup’ button.

The plugin will then run some tests, and if everything looks good, then you can click on the ‘Finish Setup’ button. The plugin settings will be stored in the WordPress database.
Once finished, you will see the plugin’s settings page. From here, you need to click on the ‘Add New’ button at the top of the page or 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’ URLs, 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’ URLs, then you’ll enter the following values:
- Source URL:
/(\d*)/(\d*)/([A-Za-z0-9-*])
- Target URL:
/$3

Don’t forget to select ‘Regex’ and click on the ‘Add Redirect’ button to save your changes.
The plugin will now redirect users to your new name-based URLs.
Alternatively, you can use the All in One SEO (AIOSEO) plugin to easily set up redirects. AIOSEO’s powerful Redirection Manager feature comes with automatic redirects, full site redirects, bulk 301 redirects, 404 error tracking, and more.
We hope this article helped you learn how to easily remove the date from WordPress URLs. You may also want to see our guide on the most common WordPress errors and how to fix them, as well as our collection of the best WordPress SEO plugins.
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.
Uomo Malazant says
There is no permalinks under the settings tab
WPBeginner Support says
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 says
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 says
The $4 tells the code to replace the url using the text after the 4th /
Admin
Karen Mazza says
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 says
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 says
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 says
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 says
Thank you for your answer!
Gabrielle Sales says
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 says
Glad our guide was helpful!
Admin
Diego says
Is it advisable to do it on a website that is 10 years old?
WPBeginner Support says
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 says
Thank you, you guys really my saviours
WPBeginner Support says
You’re welcome, glad our guide was helpful!
Admin
Onyekachi Emmanuel says
I think this helped a bit. Thank you wpbeginner.
WPBeginner Support says
You’re welcome!
Admin
Joan Ekere says
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 says
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 says
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 says
You should be able to use /(\d*)/(\d*)/([A-Za-z0-9-*])\.html
Admin
Giovana Q says
Thank you so much, I’ve been trying to do this for a while now!
WPBeginner Support says
Glad our article was helpful
Admin
Jack says
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 says
Glad our guide was helpful!
Admin
Neel says
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 says
Glad you find the permalink structure helpful
Admin