Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
25 Million+
Websites using our plugins
Years of WordPress experience
WordPress tutorials
by experts

How to Remove the Date From WordPress URLs

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

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.

How to Remove the Date from 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:

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.

WordPress Permalink Settings

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:

‘Month and name’ permalinks include the year and month:

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:

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.

Post Name Permalink

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:

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.

Activate AIOSEO Redirects

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.

All in One SEO Redirects Tab

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
Redirecting Day and Name Permalinks in AIOSEO

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
Redirecting Month and Name Permalinks in AIOSEO

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.

AIOSEO Redirects Log

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.

Start Redirections Setup

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.

Continue Redirections Setup

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.

Redirections Settings Page

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
Redirections Settings for Day and Name Permalinks

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
Redirections Settings for Month and Name Permalinks

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

Now that you know how to remove the date from WordPress URLs, you may like to see some other articles related to 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 our guide on the most common WordPress errors and how to fix them, as well as our expert pick 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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

34 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!


    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!

  3. Ralph says

    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 says

      Redirecting is very important to prevent SEO and user issues in case anyone bookmarked the old post :)


  4. Jiří Vaněk says

    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.

      • Jiří Vaněk says

        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.

  5. 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.

  6. 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

    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 :)


  7. 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.


  8. 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

      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.


  9. 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.


  10. Mahmoud SRDAR says

    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

  11. 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 :)

  12. 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.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.