When I install WordPress on a site, one of the first things I do is set the permalink structure.
What are permalinks?
A WordPress permalink is the URL generated for new posts or pages on your site. The name comes from a merging of the words “permanent link”.
Permalinks always start with your domain e.g.
http://www.abrightclearweb.com followed by a forward slash. If you installed WordPress in a subdirectory they’ll contain that in the URL e.g.
WordPress gives you the opportunity to customise your permalinks in Settings > Permalinks.
Why would you want to customise your permalinks?
Because WordPress doesn’t necessarily choose the best structure for you.
It’s an important decision and one you want to get right from the start.
While you can change your WordPress permalink structure later on, there are some possible negative consequences.
I tried a new install of the latest WordPress (version 4.6.1) and found it defaulted to the Day and Name structure.
This gives you a permalink for posts like:
and for pages:
Any permalink like this ending in words is a Pretty permalink.
Pretty permalinks are supported by most web servers, though some Windows servers might have difficulty with them. WordPress is always best installed on Linux.
To find out more about permalinks and see the different structures available, read the WordPress Codex entry on Using Permalinks.
Older installs of WordPress began life with the Default permalink structure, now known as Plain.
This generates permalinks for posts such as:
Not very nice looking! That’s why they are nicknamed Ugly permalinks.
Plain permalinks are not good from the SEO point of view:
- They’re difficult to remember and reproduce.
- They don’t tell search engines – or humans – anything about the content of the post or page.
What’s the best WordPress permalink structure?
It depends on the site, but 9 times out of 10 I’ll change the permalink setting to Post name.
Post name is the ideal choice if:
- Your WordPress site and blog are for business.
- Your blog has a small number of authors.
- Your blog is not updated daily or more often.
- You have evergreen content that is not related to a particular date. Some people might be put off if they see a date in the permalink. Even if the content is still relevant, the fact that the permalink contains /
2011/05/may convince them that the post is out of date. (In fact, some bloggers go one step further and don’t display dates on their posts – but that’s another debate!)
Post name is also the permalink type recommended by SEO expert Yoast. Which is good enough for me.
When might you want to use another permalink structure?
Large news sites will usually go for the Day and Name structure.
New York Times Open Blogs:
Some sites also use a Custom structure with the Category included as well as the Post name.
This Custom structure is
/%category%/%postname%/ in Settings > Permalinks.
The downside of this approach is that if you change a category name in the future, your links will break. It requires some careful thought to work out what categories your blog will use from the start.
How do I change my WordPress permalink structure?
It’s simple – go to Settings > Permalinks, choose the structure you want and Save Changes.
Let’s look at what happens when you do it.
What happens to post links when you change your permalink structure?
- Post permalinks – updated.
- Links to posts in menus or widgets – updated when you refresh the page.
- Internal post links on posts or pages which you added – unchanged.
- External links to your posts (those on other people’s sites) – unchanged.
- Search engine links – unchanged. Not until the searchbots crawl and reindex your site, anyway.
- Links bookmarked by yourself or others – unchanged.
What happens to the unchanged links?
They get broken. Anyone accessing them will get a “Page not found”.
Which is not good for you or your website visitors.
Read my post on fixing broken links to see why.
Now, you could go manually changing all the internal links on your site. But what about links to your posts anywhere else?
You’ve got redirects
What happens to your mail when you move house? If you want to keep receiving it, you redirect it to the new address.
You need to do the same for your permalinks if you want to keep getting traffic to them.
And guess what? The more links you change, the more you have to redirect.
If you have a big website with hundreds of permalinks, you need to factor that in.
The proper redirect to use is a 301 redirect.
As Matt Cutts of Google explains, there’s no limit to the number of 301 redirects you can have on your site.
Changing to Post name?
If you decide to change from another setting to Post name, you’re in luck.
Yoast has a handy Create Redirects Tool which will generate the correct URLs for your 301 redirects.
It generates one line of code, so is simpler to do than using a plugin if you have many redirects to do.
The code needs to be added to a
.htaccess file on your site.
Are page links affected by a permalink change?
Page links should not change. If you’ve gone from Plain to Post name permalinks, WordPress handles the redirect automatically.
How are permalinks formed on posts and pages?
If you’ve chosen any of the Pretty permalink structures, the last part of the permalink will be automatically derived from the post slug, which is generated after you create a title.
Each word in the slug is written in lowercase and separated by a hyphen.
If you use the Yoast SEO plugin, “stop words” are automatically removed from your URLs.
These are small words like “and” which don’t add anything to your SEO, so it’s better to remove them.
Here is an example:
The title is The Best Way To Keep Your WordPress Site Up To Date (And It’s Free)
The permalink is
The words the, to, your, up, to, and, it’s have all been removed.
How do I change a single post permalink?
Before a post is published
You can change a permalink when the post is in draft form by editing it directly – just click on the Edit button next to the permalink. Be careful to leave the hyphens between words, and not to make any spelling mistakes!
If you’ve changed the title and want the permalink to populate from that, edit the permalink, delete the content and save the post.
You might want to shorten the permalink so it just has your keywords in it.
There’s some evidence that shorter URLs get higher search rankings.
One other tip: if you create a list post e.g. “20 wonderful ways to publicise your website”, edit out the number in the permalink. This is in case you want to add extra items to your list later!
Brian Dean of Backlinko does this a lot. His post 201 Powerful SEO Tips (That Actually Work) has the permalink
So if he wants to add another 49 or 99 tips, he doesn’t have to worry that the permalink doesn’t match a number in the title.
After a post is published
Once a post is published, it’s wiser to leave the permalink alone, especially if the post is getting a high amount of traffic.
If you must change it, remember to redirect.
I had to do this once when I created a post and added the title later. I published the post and shared it, then realised that the permalink was bad, so I used the Redirection plugin to change it.
I have a page with a permalink ending in /about-2/ – why is that? And how can I change it?
You might have created multiple pages with the title About.
Permalinks can’t be identical, so WordPress appends another digit on to the post slug.
So you end up with
http://www.example.com/about/ for the first About page
http://www.example.com/about-2/ for the second.
You can’t edit the
/about-2/ slug to
/about/ unless you either:
- Delete the original About page.
- Edit the slug of the About page to something else e.g.
But be careful!
Remember to update any navigation referencing a deleted page. Make sure you remove the old page from the menu and add the new one, or you may find your menu has a permalink like
http://www.example.com/about__trashed/, which will generate a 404 error.
You can update your navigation through Appearance > Menus. If your page is in multiple menus, you’ll need to change each one separately.
And of course, you’ll have to redirect the old page permalink to the new one.
If in doubt, leave the permalink alone.
Over to you
What permalink type have you chosen for your site, and why? Please leave a comment below.