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.

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

It uses post ID in the URL which does not look very good or meaningful.

However, WordPress also allows you to easily change this to more meaningful and SEO friendly URLs. It gives you a bunch of options to choose from under Settings Β» Permalinks page.

Choosing the β€˜Month and name’ or β€˜Day and name’ options will add the date parameters to your WordPress URLs. They will then look like this:

Day and name: https://example.com/2020/09/03/sample-post/
Month and name: https://example.com/2020/09/sample-post/

These URLs are better than the default ugly URLs. They are still SEO friendly as well. However, they are unnecessarily lengthy and the dates make your articles look old.

That’s why a lot of users want to switch to just β€˜Post name’ URL structure which will remove the date and just use the post slug keyword in the URL.

Name: https://example.com/sample-post/

It is shorter, meaningful, SEO friendly, and doesn’t look dated as time passes.

Things You Should Consider before Removing 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 you will need to keep the following things 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 also get affected as the link backs to your old articles will 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 the redirected URLs and will reset share count for them.

Removing 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 β€˜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 start using the name-based URL structure.

Setting up Redirects to Preserve SEO Rankings

Now that you have removed the date from your WordPress URLs. You 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 are now moved to these 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 page 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 posts 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. After that, it will store plugin settings into 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 or scroll down to the β€˜Add new redirection’ section.

You will see a form with Source and Target fields. β€˜Source’ is the field where you’ll describe your old URL structure and β€˜Target’ is the location of the new URL.

If you were using the β€˜Day and name’ URLs, then you will enter the following values in the source and target fields:

Source: /(d*)/(d*)/(d*)/([A-Za-z0-9-*])
Target: /$4

If you were using β€˜Month and name’ URLs, then you’ll enter the following values:

Source: /(d*)/(d*)/([A-Za-z0-9-*])
Target: /$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.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!

Pin It on Pinterest

Add address