Do you want your WordPress URLs to be free of dates?
WordPress has a URL structure that is SEO friendly. There are several link formats available, including one that adds dates to the URLs of your WordPress posts.
We’ll show you how to easily remove the date from your WordPress URLs in this article.
Why Are There Dates in WordPress URLs?
For post and page URLs, WordPress uses a non-human-readable link structure that looks like this:
It uses post ID in the URL, which isn’t very appealing or informative.
WordPress, on the other hand, makes it simple to switch to more meaningful and SEO-friendly URLs. Under the Settings » Permalinks page, you have a lot of options to choose from.
The date parameters will be added to your WordPress URLs if you select the ‘Month and name’ or ‘Day and name’ options. They will then appear as follows:
Day and Name: https://example.com/2020/09/03/sample-post/
Month and name: https://example.com/2020/09/sample_post/
These URLs are preferable to the default, unattractive URLs. They’re still search engine friendly. They are, however, unnecessarily long, and the dates make your articles appear outdated.
That’s why many users want to switch to a ‘Post name’ URL structure, which eliminates the date and replaces it with the post slug keyword.
It’s shorter, more meaningful, SEO-friendly, and doesn’t become stale over time.
Before you remove the date from your WordPress URLs, there are a few things you should think about.
It’s safe to remove the date from WordPress URLs if you’re starting a new WordPress blog and haven’t launched it yet.
If your website has been around for a while, however, you should keep the following points in mind.
Users and search engines may receive 404 errors if the URL structure is changed. This means that your Google Search Console reports may contain warnings and errors.
Your search engine rankings may be harmed as well, as links to older articles will now result in 404 errors.
Both of these issues can be resolved by using redirects, which we will demonstrate later in this article.
Your social share counts will be reset if you change the URL structure. Most social share count services, unfortunately, do not track redirected URLs and will reset share counts for them.
Taking the date out of WordPress URLs
To begin, you must create a complete WordPress backup of your site. This will allow you to restore your website to a previous state in the event that things do not go as planned.
Then go to Settings » Permalinks and select ‘Name’ as your permalink option.
Remember save your changes by selecting “ the ‘Save Changes’ button.
WordPress will now remove the date from your URLs and replace it with a name-based structure.
Using Redirects to Maintain SEO Rankings
Now that you’ve removed the date from your WordPress URLs, you can move on to the next step. You must set up appropriate redirects.
Users will be redirected to the updated URLs without receiving a 404 error. This will also assist search engines in recognizing that the old URLs have been redirected to the new URLs.
After you’ve activated it, go to Tools » Redirection and click the ‘Start setup’ button.
The plugin will then present you with a few options. It can detect and notify you if the URL of a post is changed, as well as keep a log of redirects. You can also uncheck both of these boxes and just click the ‘Continue setup’ button.
After that, the plugin will run some tests, and if everything appears to be in order, you can click the Finish setup button. The plugin settings will then be saved in the WordPress database.
After that, you’ll be taken to the plugin’s Settings page. Click the ‘Add New’ button at the top of the page or scroll down to the ‘Add new redirection’ section.
A form with Source and Target fields will appear. The ‘Source’ field is where you’ll describe your old URL structure, and the ‘Target’ field is where you’ll put the new URL.
If you used the ‘Day and name’ URLs, fill in the source and target fields with the following values:
/$4 as a goal
If you’re using ‘Month and name’ URLs, you’ll need to fill in the following information:
/$3 as a goal
Remember to select Regex and save your changes by clicking the ‘Add Redirect’ button.
Users will now be redirected to your new name-based URLs by the plugin.
We hope you found this article useful in learning how to remove the date from WordPress URLs.