Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Remove the Date from WordPress URLs

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.

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

Permalinks page

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

Subscribe to WPBeginner

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.

Change permalinks

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.

Start redirection 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 on the ‘Continue Setup’ button.

Continue setup

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.

Add new redirect field

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

Redirect rules for day and name URLs

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
Month name redirects

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.

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.

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

18 CommentsLeave a Reply

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

    • 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

  2. After setting the redirects will my site still be seen by search engines?

    Is there a possibility that it will later affect rankings?

    • 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

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

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

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