At a basic level, permalinks in WordPress control the structure of the URLs for the posts and pages that you publish. For example, our permalink structure is the reason the URL of this post looks like
https://wplift.com/wordpress-permalinks, rather than something else.
Though they certainly aren’t a sexy subject, WordPress permalinks are an exceptionally important setting on your WordPress site, especially because it’s a bit more difficult to change them once your blog becomes established (more on this later).
Why You Need To Care About WordPress Permalinks
There are two main reasons you need to care about the permalinks on your WordPress site:
- Usability - permalinks actually make it easier for humans to use your site.
- SEO - well-structured permalinks are an important on-page SEO factor.
It’s got that double whammy of making life easier for both human visitors and search engine robots!
Let me give you an example of why a well-structured permalink is important:
Say someone sent you a URL to visit and all you saw was this:
With the first URL, neither you nor search engines would have any idea what the link is about just from looking at it.
With the second URL, you instantly have at least a pretty good idea of what you’re going to find when you visit the page (and it’s the same for those search engine robots).
You might think it’s a little thing, but people are going to share plain URLs like this all over the place. They’ll share them on:
- Social media
You name it!
And when they do, you want to put your content’s best foot forward so that it gets the visibility that it deserves.
How To Set Permalinks In WordPress
Note - if you’re working on a WordPress site where you’ve already published lots of content and are ranking in the search engines, I encourage you to read this entire article before making any changes because there are some additional considerations for changing permalink structure on an established site.
Don’t worry - you don’t need to be a coding genius to set the permalinks on your WordPress site. WordPress actually includes a user-friendly settings area where you can make all the necessary changes.
To access it, go to Settings → Permalinks in your WordPress dashboard.
Here, you can choose from 5 pre-built permalink templates, as well as the option to create your own custom structure from the available options:
While the choice is up to you, most sites will be best off using the Post name option because:
- It’s the simplest structure and puts all the emphasis on the relevant text
- Unless you’re a news site, using dates in your content can make your older content seem out of date, even if you’ve updated it (plus, WordPress already shows the published date, so you’re not tricking your readers or anything)
- Using categories in your permalinks can cause issues if you ever want to change a post’s category at some point in the future.
If you’re running a news site that publishes lots of posts daily, you might want to use one of the structures that includes the date because the date is actually relevant to the topic. But again - for the average WordPress site - Post name is usually your best bet.
Once you select your desired permalink structure, click Save Changes at the bottom to make your selection live:
WordPress Permalinks vs WordPress Slugs
When you set your WordPress permalinks, you create the basic URL template that all the content on your site will follow.
A slug, on the other hand, lets you edit part of that template for individual pieces of content.
For example, in the previous section, you set your permalink structure to:
When you edit a slug, you can actually manually change the
/%postname%/ part for every single piece of content on your site to make it whatever text you want. Here’s how:
How To Change Slugs For Individual WordPress Posts Or Pages
You can change slugs in the regular WordPress editor that you use for posts and pages.
When you initially create a new post or page, you won’t see the option right away:
But as soon as you save a draft, a new Permalink setting will appear:
To edit the slug, click the small Edit button.
Then, type in your new slug and click OK:
So what should you make your slug? Usually, you want to:
- Include your main keyword in the slug
- Keep the slug as short as possible (while still accomplishing that first part)
Also, you should be aware that:
- You cannot use spaces in the slug. If you try, WordPress will automatically replace them with dashes.
- You cannot use other non-text characters, like an exclamation point or the @ symbol. If you try to include them in the slug, WordPress will automatically remove them.
Why You Need To Be Careful About Changing Permalinks Or Slugs On An WordPress Active Site
If you’ve just created a new site, you can feel free to change your permalinks and slugs right away.
But if you’re working on an existing site, you need to be a little more careful about changing your site’s permalinks.
- Google will have already indexed your content in the search results with your current URL structure. If you suddenly change it, all of those links will stop working and your site will lose a lot of traffic from search engines.
- If humans have linked to your posts, all of those links will be broken too, which means you’ll lose traffic from them as well.
Does that mean you can’t change permalinks on an established WordPress site? Of course not!
But if you want to do it safely, you need to set up something called a 301 redirect.
With a 301 redirect, your web server will automatically reroute humans and search engines from the old URL structure to the new URL structure.
Basically, it’s like nothing ever happened! Everything still functions exactly like it’s supposed to.
To generate the 301 redirect code snippet that you need, you can use this free tool from Yoast (assuming you chose the Post name permalink structure).
Then, you’ll need to add that code snippet to your site’s .htaccess file. This is a very important file, so if you’re not sure what you’re doing, I definitely recommend asking a developer for help rather than trying to do things by yourself.
We wrote a tutorial on how to add 301 redirects to WordPress. But again - be careful and make sure you back up the file before making any changes.
WordPress Permalinks Are Important. Spend Time To Get Them Right
Your site’s permalinks are small but mighty.
If you’re working on a new blog, it only takes a few seconds to set your permalink structure and start reaping the usability and SEO benefits.
And even if you have an established site that you never changed the permalink structure for, you can still make the switch - just make sure to set up the proper 301 redirects to direct traffic to the new permalink structure.
Have any other questions about WordPress permalinks? Leave a comment and we’ll try to help out!