Changing the permalink has a negative side effect if the blog post already receives some search engine traffic.
Changing the permalink technically means giving a new URL to our blog post by deleting the old URL.
This also means that the blog post can now be accessed only through the newly updated URL and is no longer accessible through the old URL.
But if someone still tries to access the post through the old URL, WordPress will throw a 404 error, a.k.a “Page not found” error.
This is not a problem if the blog post is not indexed in search engines like Google or gets no direct visitors.
This is because nobody knows that the blog post exists.
So, nobody can visit the old URL to experience the 404 error (Page not found error).
But if search engines already index the blog post and get some search traffic, it is a big problem, and you could quickly lose website visitors.
The thing is, search engines like Google rely on the URL of the blog post to send visitors to your website.
But, when we change the permalink to produce a new URL from our side, search engines like Google do not update the new URL in their index.
Also, to make things worse, search engines do not delete the old URL from their search results page either.
So, when someone clicks on your blog post from Google’s search results page, they will land on a blog post with an old URL.
But since that old URL got deleted when we changed the permalink, WordPress shows an error page that says, “404 error, the blog post doesn’t exist”.
This is a big problem because your website loses trust in the eyes of Google and the visitor.
If you lose trust, you lose business.
But don’t worry.
All hope is not lost.
It is just that we need to do some extra hard work to make things right again with the search engines and visitors.
To not lose the visitors and the trust, the solution is to add a redirection from the old URL to the new URL.
Simply put, when someone accesses the old URL, they must be automatically redirected to the new URL.
Regarding terminology, this kind of redirection is called “301 Permanent Redirection”.
301 is the code that indicates a permanent redirection from the old URL to the new URL.
In other words, when someone tries to access the blog post through an old URL, it internally shouts that:
“Hey! You’re trying to access an outdated URL of the blog post. The blog post is permanently moved to a new address (new URL). So, I am taking you to the new URL”.
When the redirection is complete, the blog post becomes accessible again without a 404 error.
Got it, but how do we implement this 301 redirection?
By default, WordPress doesn’t have the functionality to implement 301 redirections.
So, we have to install a plugin to implement the redirection.
If you remember, a plugin is nothing but a custom code that extends the functionality of a WordPress website.
There are so many plugins that help you add 301 redirections, but the plugin that I regularly use is “Redirection”:
When we learn how to install and use plugins, we will learn how to add 301 redirects using the “Redirection” plugin.
And in the next lesson, we will learn how to add a post excerpt to a blog post.