A guide how to change permalinks of already published post
Changing the permalinks structure on your website is a major undertaking. You should be absolutely sure you want to make this change to your site because it can potentially have an impact on your SEO.
If you have tried modifying the post slug/URL of your old posts, you might have to stumble upon 404 error and other problem too.
What is a permalink?
Each page and post on your blog has a unique permanent URL, or ‘permalink’, assigned to it. A permalink is the part of a web address that follows the domain name. For example, take a look at the URL for this blog post:
The domain name is focusoncode.com, and the permalink is how-to-change-permalinks-of-old-posts. Permalinks, when set correctly, serve several important purposes. For example:
- They allow your readers to get a brief understanding of what your post or page is about without looking at the content.
- They are used by search engines to discover the post or page topic solely from the URL.
- They also supply a permanent location for your visitors and search engines to return to in order to read your content.
- They are essentially a unique identifier for each piece of content you create, helping you keep everything organized.
To set the structure for your permalinks in WordPress, you would need to go to Settings > Permalinks in your dashboard. By default, WordPress permalinks use the Day and name option. If your focus is more on the content of the post than the date it was posted, however, it’s often best to use the Post name option. This structure makes the focus of your post clear to both readers and search engines.
Most people will change the default permalink structure of their WordPress blog at its creation. There are several options to choose from, but the most common two choices are the structure that shows the date followed by the post name or simply the post name on its own. This choice is usually made with the intended content in mind. For example, websites that focus on news items tend to have the date as part of the permalink structure.
How To Safely Change The Permalink Structure
Before you make any changes to your site’s link structure, it’s important to make a backup of your site just in case. It’s also smart to test your changes on a staging site before you implement them on your live site, so you can troubleshoot any issues that may arise.
If you’ve decided that you do want or have to change your permalink structure, you’ll need to take a few steps.
1. Decide on a New Permalink Structure
The first decision you need to make is the syntax of your new permalink structure. When choosing a new structure you need to make some decisions about what you will include in the syntax of the link. Do you want to include a date, for example? If you do, how much of it do you want visible within the link?
It is an important decision and you shouldn’t make any changes at all until you have made absolutely sure of your choice. You can get some ideas for your new structure from WordPress’s guide to using permalinks. In general, the Post name option is ideal for most users, although news-related sites may want to include dates. Either way, once you decide on your new structure, it’s time to actually make the changes to your permalinks.
2. Change Your Permalink Structure in WordPress
Once you know which syntax you are going to use, it is time to go into the Permalinks menu of your dashboard and make the change. Simply navigate to Settings > Permalinks in your WordPress backend, and make your selection from the settings, once you make your selection, click on Save. Your permalinks are now updated! This will now update all of your internal URLs with the new syntax.
3. Fix Broken Links With 301 Redirects
As we noted earlier, changing the structure of your permalinks is the easy part. Now, however, you have to deal with the fallout. Every reference to your prior links, whether within your content or on external sites, is now broken. Another side effect is that any content that has been indexed by search engines is also incorrect.
There is a simple solution to this problem and that is to setup 301 redirects on your website. A 301 redirect essentially tells any browser that comes to your site using an old permalink structured URL where the relevant content is. It also lets search engines know that this is a permanent change. You’ll probably also want to customize your 404 page as well to catch any broken internal or manual links that you may have overlooked.
In the past, you would have been required to add all of these redirects manually to your .htaccess file on your web server. Thankfully, with WordPress, there are plugins that can take care of all of these things for you.
4. Changing Search Engine Links to the New Structure (Re-indexing)
We mentioned earlier that search engines will have incorrect information after you update your permalinks structure. Unfortunately, this is beyond your control as a site owner. Search engines regularly crawl sites and will update when they find changes, so this problem will correct itself over time.
You can, however, help the process along by creating an XML Sitemap, and then manually re-indexing your site with search engines.
© 2020 www.focusoncode.com