Updated 14 May 2018.
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. http://www.abrightclearweb.com/wordpress/.
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:
http://www.abrightclearweb.com/2016/09/08/sample-post/
and for pages:
http://www.abrightclearweb.com/sample-page/
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.
Plain permalinks
Older installs of WordPress began life with the Default permalink structure, now known as Plain.
This generates permalinks for posts such as:
http://www.abrightclearweb.com/?p=9734
And pages:
http://www.abrightclearweb.com/?page_id=2
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/
0
4/Â 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.
Examples are:
New York Times Open Blogs: http://open.blogs.nytimes.com/2016/08/29/testing-varnish-using-varnishtest/
TechCrunch: https://techcrunch.com/2016/09/07/courage/
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.
Examples are:
WP Beginner: http://www.wpbeginner.com/wp-tutorials/how-to-add-google-search-in-a-wordpress-site/
Design Reiver: http://designreviver.com/tips/top-10-points-consider-redesigning-website-2016/
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.
The Yoast SEO plugin used to automatically remove “stop words” from your URLs. “Stop words” are small words like “and” or “in”.
Yoast says it removed the clean slugs feature because:
It has always been bug prone and is not really important for SEO anymore, so we removed it in Yoast SEO 7.0.
You could still remove stop words yourself by editing the permalink directly, as in the example below.
The title is The Best Way To Keep Your WordPress Site Up To Date (And It’s Free)
The permalink is http://www.abrightclearweb.com/best-way-keep-wordpress-site-date-free
The words the, to, your, up, to, and, it’s have all been removed.
However, read this article on why you should not always remove stop words.
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 http://backlinko.com/actionable-seo-tips
.
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
and
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.
/about-us/
.
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.
A very timely post, Claire. I will be in touch!
Cheers Jan! 🙂
Brilliant info Claire thank you very much… you wrote it just as I needed to know 🙂
That’s great Susie. Great minds think alike… 🙂
What a great post. So much helpful information and practical ways to get out of trouble when permalinks change. I use the “pretty” format – e.g. http://www.LookAtMyWebsite.com/fantastic-website/ – simply because I considered it better for SEO. I’m still getting used to WordPress after being an avid XSitePro fan for many years, so posts like this are always useful. Thank you Claire.
Thanks David – your comments are always appreciated! 🙂
Great article Claire, just the information I was looking for. Well done!
Claire, this is a great post and well laid out. You definitely want to at least use the keywords in your post title as your post URL because this will help increase your SEO ranking.
Also, there a great little plugin called Velvet Blue Updates URL, which updates all URLs in your website by replacing old URLs with new urls. This might help with category tag changes, but you definitely want to plan your categories when the website is built. People tend to think this is unimportant until they want to change their categories, so when I am building out site, I make this part of the planning stage.
Thanks Sandra! Good point about the categories. I don’t think most bloggers put enough thought into them.
I haven’t come across the Velvet Blues plugin before. Would it still work if you weren’t changing the domain?
I’m a beginner in this industry so all of the information I get on internet is very important to me and I’ll save it on my folder and I summarized them all every week end to get more idea on how can I manage properly my SEO campaign. Your article is one of the best and useful so I will save it too.
I don’t have any idea about permalink and now it’s all cleared to me thank you for that.
Hi Claire, You did a great job by writing this post. I’m going to change my permalink structure from category base to post name as it is independent of other factors like category, date-month-year etc etc.
Overall, I enjoyed while reading this post.
Thank you.
Hi Claire, if you have your permalink set up in a different way, say date and post title, how easy is it to change the permalink structure to ‘post title’, in terms of all the links that are currently out there in the wild being shared on social media, plus all the internal links on your site?
Hi Alan
You can’t easily change all the older permalinks out there. If you know who has linked to you e.g. someone has left a trackback or pingback on your blog, you could email them and ask them to change the link.
Otherwise redirection is your best bet. Anyone following an old link will be sent to the new one.
This is a great concise article – worthy of a bookmark :o)
Very nice post about permalinks and website structure. How content is structured and how your pages link together is very important to how it will rank in the SERPs. A couple good external references in there as well. Thanks for the good content!
Thanks Good information.
Please advise is this seo friendly
/%category%/%postname%.html/
Use the post name URL structure as that is considered the most SEO Friendly
nice post. Now I completely understand the importance of wordpress permalink importance for seo. Glad I found this.
Thank you so much,it is helpful for many of us.
After reading your post, my conclusion is this; I believe that the permalink structure doesn’t really matter to Google or any other search engine as far as display or indexing issues go. However, I believe the problem may lie in causing confusion to them about site functionality. For example, if a website site publishes news, I believe it should use a permalink structure like this: /%year% /%monthnum%/%day%/ and possibly with the time too but if you’re publishing content that will never expire, you should simply use: /%postname%.
I have recently been re-working one of my blogs here: https://newapk.net that I originally started with Blogger but eventually migrated to WordPress. When I migrated to WordPress, I kept the same Permalink structure originally created by Blogger and have been wondering heavily here recently about whether I should change it or not. Your post here has help me make up my mind to just leave them as they are.
Thank you for the time you spent researching this information and putting this post together. I’m sure it will benefit a lot of others just as it has me.
Thanks for your kind words Aan – I’m glad the post helped. 🙂
Hello friend, I read through your blog posting on permalink details. You have covered informative contents regarding how it is created and how it works. Thank you for sharing such a nice blog. Keep updating.
Great & a very useful article about Permalinks. One doubt is that-
Can I change multiple post permalinks ?
waiting for a solution.
The Permalink Manager Lite plugin claims to do bulk permalink edits: https://wordpress.org/plugins/permalink-manager/
I haven’t used it personally. If you want to try it, use on a test install of WordPress, to begin with.
Nice way of presenting each point.
I have read this blog. This is written in a very simple and understandable language. I like it man.