If you are looking for the best WP permalink structure, I have an option for you, or at least some good info to get you on the right path.
After doing some searching on Google for the best SEO practices and SERP related issues for Wordpress permalinks, I found there are literally hundreds of solutions or suggestions. Here’s how I found the best solution for your custom permalink structure. Some blogs advise using a plugin or even modifying core WP code (I would suggest you don’t).
Basically, the biggest hurdle I found is making sure your posts and pages do not succumb to the infamous “infinite” duplicate content bug, which occurs when Google indexes your post permalinks with and without a trailing slash (if you are using just /%postname%/) and whenever someone types ANY combination of characters into the category portion of your permalink (if you are using /%category%/%postname%/).
Hard to imagine that if you type domain.com/2008/your-post/ or domain.com/FAIL/your-post/ that Google may end up indexing both and therefore create the dreaded duplicate content scenario! But it’s true, try it on your own blog…and if you want more details on this, you can check out this blog post on permalink structure and duplicate content.
So, let’s get to the best solution for this annoying problem.
The answer is two-fold…first, your old permalink structure needs to be properly redirected to your new, better one. Second, your blog needs to handle each incorrectly spelled permalink URL by presenting the visitor with the proper permalink to the post or page.
Start off by downloading and activating Scott Yang’s Permalink Redirect WordPress Plugin (SVN is also available). Scott’s latest version of the plugin integrates a 301 redirect solution for any old permalink structures that you have stopped using — thereby saving all those potentially lost visitors. (This was previously solved by using another plugin, Dean Lee’s Permalinks Migration Plugin for Wordpress).
Once you’ve installed and activated the plugin, (just follow Scott’s simple instructions — I’ve successfully used it with WP 2.7 installations without a hitch) go to Settings –> Permalinks in your Wordpress Admin panel and COPY your current Permalink Structure. *This is important whether you are using a Custom Permalink Structure or a Standard/Default WP Structure!* Now that you’ve copied your current permalink structure, select Custom Permalink Structure and enter your new permalink structure, with the following tips in mind:
For best SEO and SERP results, Google does NOT want a trailing slash and would like posts to end with .html — which is something I personally do not use, as some visitors may type in a permalink and forget to add .html! Instead, compromise by dropping the trailing slash and keeping your Wordpress permalink format short and sweet.
Top 5 Wordpress Permalink Structure Suggestions
/%year%/%postname%
i.e. www.yourdomain.com/blog/2009/post-name
My personal favorite, please note there is NO TRAILING SLASH after Postname!
/%postname%
i.e. www.yourdomain.com/blog/post-name
A very popular choice, Wordpress will automatically add a dash and numerical value if you use the same Post Title more than once (no worries there!). Again, please note there is NO TRAILING SLASH after Postname!
/%category%/%postname%
i.e. www.yourdomain.com/blog/category-name/post-name
Standard Blog issue, please note there is NO TRAILING SLASH after Postname!
/%postname%.html
i.e. www.yourdomain.com/blog/post-name.html
Google’s favorite, every blog entry post ends with .html
/%category%/%postname%.html
i.e. www.yourdomain.com/blog/category-name/post-name.html
Google + Standard Hybrid, every blog entry post ends with .html
Now, update your Permalink settings to your new WP Permalink Structure and then head over to Settings –> Permalink Redirect to update the plugin settings to reflect your recent changes.
In the Old Permalink Structures box, PASTE your previous Permalink Structure that you COPIED from the previous step. Your done. But, Scott has provided some really great additional features with the plugin — I suggest you take full advantage of them.
Here’s the rundown on the other features:
Feedburner Redirect — The Permalink Redirect Plugin will also automatically redirect your Blog’s feeds directly to your Feedburner feed, if you have one set up. (If you don’t… what are you waiting for? Sign up for Feedburner — it’s FREE, owned by Google, and just an awesome service.)
Hostname Redirect — This is another key to avoiding duplicate content syndrome. Activate this and all visitors who forget to add the WWW prefix to your domain/blog will be automatically redirected by the Permalink Redirect Plugin to the WWW version (no matter what page or post they are trying to visit)! By the way, for those of you using McLeavy’s Domain Mirror Plugin, this will NOT conflict and works just fine together.
Here’s a Quick Summary of steps (like the Wordpress 5-minute install)
- 1. Download Permalink Redirect Plugin
- 2. Follow Plugin Install & Activation instructions
- 3. From WP Admin, go to Settings –> Permalinks
- 4. COPY your existing Permalink Structure
- 5. Enter your new, better Permalink Structure
- 6. From WP Admin, go to Settings –> Permalink Redirect
- 7. PASTE old permalink structure into box
- 8. Enter Feedburner info & check off Hostname Redirect
Click Update Options and you are done! Congratulations.
- Also, for those of you who like to dig a bit deeper into the inner-workings of how this all happens, I’ve found another very useful resource, it’s an excellent tutorial on actually setting up 301/302 domain redirects, including old permalinks, by editing your .htaccess file manually (only recommended for advanced users):
If you find any other useful resources or tips on this subject, please leave a comment to let everyone know!
If you haven’t heard, there is a malicious worm attacking WordPress blogs with version 2.8.3 or below. Check out this post I wrote about the situation: WordPress Worm Attack
















Nice tutorial. I wasn’t aware there was a such a problem.
I tried it in my blog and, in fact, seems all possible URI combinations would redirect to the same page but, if that’s being done correctly by 301 redirects, wouldn’t the search engines acknowledge the redirection and avoid the double indexation?
Follow me on Twitter!
Hi Guilherme! Thanks for your comment.
I think the main problem is that Wordpress may not be properly using 301 redirects to achieve what you just mentioned.
The plugin’s author, and from other sources I read, have stated the problem does indeed exist and the only way to fix it is by doing the proper 301 redirects — which the plugin makes dead-easy for most WP blog admins.
I should add Gravatar, like your website…it is nice to have some imagery with each comment. =)
By following your great blog post on the very subject of adding Gravatar, no less!
Using Gravatars on your site
[...] Best Wordpress Permalink Structure [...]
For some reason my permalink structure has an extra // in the middle of it, so everything breaks down.
It was great working with you on fixing this problem, Frank. Turns out that Frank had a number of URL-related issues after moving his entire blog over to Wordpress from Blogger. By carefully backing up his database and WP installation, we successfully changed Frank’s permalink structure to exactly what he wanted and have done additional work to make his very popular blog even better.
If you are having any trouble with this specific or any other Wordpress-related issue, please feel free to contact me and I will be happy to assist! [Michael]
Follow me on Twitter!
Frank, you need to take a look at your WP Blog Settings in WP-Admin.
Log into the wp-admin interface and go to Settings –> General and take a look at both your WordPress Address (URL) and Blog address (URL) settings. Both of these addresses should NOT have a trailing slash / if you start your permalink structure with a slash as well.
For example of a correct setup:
I hope this explains the problem you are having. For best results, I would suggest removing the trailing slash in your Blog URL settings, to match how I have mine set up. Many, many people do NOT add a trailing slash when typing in your domain, so it is best not to use a trailing slash in the first place.
Sweet blog. I never know what I am going to come across next. I think you should do more posting as you have some pretty intelligent stuff to say.
[...] Best Wordpress Permalink Structure [...]
i wish i ad a website like this one.very useful info
I believe that I have followed your directions, however, it will not work for me. I loaded Scott Yang’s plugin and activated it. I opened the Permalinks window and changed from Default to Custom and entered /%postname%.html and saved the changes. Then, I opened the Permalink Redirect window and put in the old structure as /?p=#. I checked Hostname Redirect and saved the changes. I opened the site and chose a Link which then generated a 404 page. I tried quitting and restarting the browser. I emptied my cache. Still no good. Any suggestions?
Follow me on Twitter!
Hi Mark,
What version of Wordpress are you using? I have not tested Scott’s plugin with anything above 2.8, so I am not sure if that would be an issue or not.
It seems like you followed everything correctly, but I would double-check your entries for the custom permalink structure and also try to deactivate the Redirect plugin to see if it is causing the issue…if all else fails, go back to the start and retry.
If you have more trouble with this issue, let me know and I’ll try to assist.
Michael,
I simply can’t get it to work. I’m using 2.8. Could you call me and go into the site together?
This is important to me and I would be happy to pay a consulting fee if you can get it to work.
My phone is {clipped}
Mark
Was really happy to help you fix this problem over the phone, Mark. Just as a tip to everyone else reading this post…Mark experienced an issue that is not mentioned in this tutorial, which is a rare situation where a WP install does not have the ability to create/write to the .htaccess file. After a bit of work and a few FTP uploads, everything is working great for Mark now, with WP Version 2.8+ using the same steps from this post.
If you are having any trouble with this specific or any other Wordpress-related issue, please feel free to contact me and I will be happy to assist! [Michael]
Follow me on Twitter!
I tried a few times to change my permalinks a few times and failed. I thought I was stuck with a horrible permalink structure like this:
/index.php/%year%/%monthnum%/%day%/%postname%/
I have decided to give it another go and it worked first time and my structure now is:
/%year%/%postname%
Thanks
Follow me on Twitter!
Hi Tracy!
Glad to hear it is working well for you. You happened to have picked my personal favorite choice for permalink structure, which is what I am currently using for this blog.
I checked out your website and will start following you on Twitter.
Thank you for your comment.
It does not work for me
This
/%year%/%postname%
does not work..my blog stops loading
This
/%year%/%postname%.html
does not work either and my blog crashes
Only stuff like this works
/%year%/%postname%/
And i have the latest version..
Follow me on Twitter!
I have used /%postname% for my blog and it’s working just fine…
Nicely put, I agree with the idea.
I personally like the “All in One SEO Pack” quite a bit.
What is driving ME crazy is this following issue:
I have changed my domain from .net to .com. Though the old domain works too, I want all .net/etc/etc URLs to direct to .com/etc/etc. Every time I try a 301 redirect on .htaccess, though the actual redirect seems to work, the result is that all permalinks are broken, excluding the home page.
Any help?
Michael, first of all, you have really done a beautiful job with the design of your site.
I followed your tutorial for the launch of our new corporate website.
I set the permalinks to: /%category%/%postname%.html
Our blog lives at: http://www.enhancedvision.com/low-vision-blog.html
The link to a category within the blog looks like this: http://www.enhancedvision.com/educational
I have years of php and web dev experience and there is one problem I have no clue in solving.
If you add “low-vision-blog” into the url when you are viewing a category it adds .html within the url. Here is an example:
If I enter this url into the browser: http://www.enhancedvision.com/low-vision-blog/educational
Wordpress redirects it to: http://www.enhancedvision.com/low-vision-blog.htmleducational
It adds the .html right into the middle of the url!! Any help would be appreciated. Thank you in advance!
Follow me on Twitter!
Hi Ammer,
Thanks for your compliment. Without looking deeper into your WP setup options, I’d say you are perhaps running a plugin to remove the “category base” from the URL structure? Typically a category would be in the following structure:
http://www.enhancedvision.com/category/educationalAnd that seems to work fine on your website, along with the URL without the
/category/in it. So, I am not really sure why you are attempting to use../low-vision-blog/educational— when both of the other URL structures already work fine. The directory of low-vision-blog most likely does not exist, so you could just add that as your “category base” in your WP options.Reference the following URL for more information on category_base options:
http://codex.wordpress.org/Using_Permalinks#Category_base_and_Tag_base
Let me know how things turn out, or if you need any additional assistance. I’d be happy to help.
You are absolutely correct, the “top level categories” plugin is being used and it is removing the category base.
Here is why it is a problem:
The blog has been indexed in Google with /low-vision-blog/ in the URL and all of those indexed links go to the problem link.For example: http://www.enhancedvision.com//low-vision-blog/educational/eating-for-eye-health.html is indexed and when you click the link from Google, Wordpress generates the problem url: http://www.enhancedvision.com/low-vision-blog.htmleducational/eating-for-eye-health.html
The link works, but now I am seeing a duplicate content issue in Google Webmaster Tools. I even have the canonical tag set via seo tools. So my ideal solution would be for Wordpress to not generate this weird url.
Thank you, you are obviously a knowledgeable expert on the subject from your fast accurate responses!
Follow me on Twitter!
There may be an issue with the plugin you are using to remove the category base. I cannot be certain what is causing WordPress to create a faulty URL, which is somehow being indexed by Google. Ensure you are using a valid XML-based Sitemap.
WordPress creates a very “forgiving” URL situation, by resolving even erroneous URL entries to the correct blog entry. Try removing a few of the letters from the URL of this very page…and you’ll notice WP will figure out which post you meant to go to.
Double check your settings, as well as the plugins being used that affect your base URLs, and then consider different methods to fix the indexing problem, possibly using 301 redirections. If you’d like me to take a look at it, just let me know and I will schedule a time to help fix the issue with you. Sometimes it is easier to get the problem resolved quickly, as opposed to researching your night away.
Very, very useful tutorial. Thumbs up for site design, great job.
Thanks so much for a fantastic tutorial! I’m a novice blogger but I was able to follow the steps for the permalink redirect without a hitch. Now my keywords are in the post url’s and NO MORE trailing slashes! I’m running on WordPress 2.9.2 and Scott Yang’s plugin works perfectly. My next step will be to correct my site’s url canonization error…
Best wishes!
Follow me on Twitter!
Excellent tutorial to configure the wordpress permalink structure. thanks for sharing.
[...] was the Permalink Redirect WordPress Plugin by Scott Yang. Why? Primarily because of this thorough blog post about the Permalink Redirect Plugin by Michael [...]
thank you for providing SEO friendly permalink structure…..
nice theme how to create a contact form like you? its awesome
thanks i use /%category%/%postname%.html and helps me on top on google . thanks for sharing ..