There may come a time in your blog's life where you have to change the permalink structure. Chances are, you're looking to slim down your links and make it easy for your users to remember going forward.
The good news is that updating your permalink structure is pretty easy and the function lives right in WordPress! So let's dive right into it, shall we?
What are permalinks?
The term permalink is short for “permanent link” and it is essentially the URL of any individual page on your site.
For example, one of the permalinks for our blog posts reads as follows:
https://www.wptasty.com/how-to-optimize-your-images
So let's break down the anatomy of this permalink below:
- wptasty.com is the domain and will remain static all throughout.
- /how-to-optimize-your images is the permalink's slug, the part of the URL that follows your domain and specifies the content on the actual page. In this example, you can clearly see that the content lives on our blog as well as the title of the post. This is typically generated automatically for you based on the title of your post, but you can certainly edit it yourself if you'd like! Just go to Post > Permalink on the panel on the right-hand panel within the post editor.
Onward!
Why should I edit my permalinks?
In a perfect world, you'd have the perfect permalink structure set up from your site from the beginning. But alas, that is not always the case!
Going back to the example of the permalink we just talked about, it's pretty easy for users to come to the conclusion that this post talks about how to optimize your images. And that's a good thing!
After all, who can remember something like “wptasty.com/2021/05/04/nameofblogpost”?
Ain't nobody got time for that.
Keeping extraneous information (like the publish date and the post ID) out of your permalinks just makes for a better user experience because it allows them to quickly find your content, so we definitely recommend evaluating your permalink structure to see how you can improve upon it.
How do I edit my permalink structure?
This here's the easy part! All you'll have to do is navigate to your WordPress dashboard, hover over Settings, and select Permalinks. That'll take you to the following page:
As you can see, there are lots of ways to customize your permalinks. You can get right down to the minute and hour that you published your post!
To make it simple for ourselves and our audience, though, we've opted to just have our blog URLs end in “/%postname%”—that way, our URLs look like this: https://www.wptasty.com/how-to-optimize-your-images
Magic!
As we mentioned before, the permalink slug is typically generated automatically for you based on your post title, but you can take steps to further optimize the structure! For example, the slug for a post might read “how-to-make-the-best-carrot-cake” and that's fine. It gives search engines and users a pretty clear idea of what sort of content they can find on this page.
But! We can go one step further and prettify the link. So instead of that long string, we can trim it down to “best-carrot-cake” so the URL reads “blogname.com/best-carrot-cake“. Simple and succinct! There's no mistaking that the page you're on contains a recipe for the best carrot cake.
Does updating my permalink structure impact my SEO?
Updating your permalink structure can indeed impact your SEO. Think about links from external sites and internal links within your own content—those all use the previous iteration of your permalinks, which can lead to the dreaded 404 error.
So how do we go about preventing that from happening?
✨ Redirects. ✨
Redirects (specifically, a 301 redirect) tells the browser that when it's attempting to navigate to an old iteration of the permalink, it should actually make its way to the new iteration of the permalink. This also lets search engines know that this is a permanent change, so you won't have to worry about Google search results taking users to a broken page.
One thing to keep in mind here is that WordPress will attempt to automatically create 301 redirects for your blog post URLs, but you'll want to test your old links out to make sure that is the case.
If you need to manually create directs, though, there are plugins for that.
Simple 301 Redirects plugin
The Simple 301 Redirects plugin makes it super easy for you to create 301 redirects on your site right after you update your permalink structure. All you have to do is input your old permalink structure in one field, and the new structure in another field. Then, save your changes and you are good to go.
For example, in the Request field here, we'd put in something like /2021/05/12/sample-post/. In the Destination field, we'd put in /%postname%. Easy peasy!
Redirection plugin
The Redirection plugin is another alternative you can use to set up 301 redirects and it gives you some more granular controls—all you have to do is enter the old permalink into the Source URL field and the new one into the Target URL field.
The plugin also keeps track of any 404 errors so you can clean them up whenever they crop up!
Yoast Permalink Helper
The SEO extraordinaires over at Yoast created their own tool to help you set up redirects. The only caveat is that you will only have the option to update your permalinks to the /%postname%/
structure, which is Yoast's preferred structure. This one requires a little bit more work on your end, as the tool generates a code for you to add to your site's .htaccess file. If you use Yoast, you can edit it right through their SEO settings page!
Summing it all up
WordPress makes it really easy for you to do so if you didn't adjust your permalink structure to your liking right when you created your site. Our recommendation is to use the post name as the slug so that search engines and users can get an idea of what to find on your page right away.
From there, you'll just need to create 301 redirects to ensure that any of the old links floating out there will take users back to the right page!
Making a site-wide change can seem a little daunting at first, but with the right tools at your disposal, you'll find that you can check it off of your to-do list faster than you think!