Permalink Settings

Permalink Settings
Enlarge

Permalink is a combination of the words “permanent link“, similar to how blog is a combination of “web log”. A permalink simply means the URL to a page or post on your website/blog.

There has been a lot of disucssion about the proper structure for permalinks, especially since the advent of “Pretty Permalinks”, and a lot of people have their opinion on what the best structure is. This is my best advice when it comes to permalinks, and it’s a combination of advice from an SEO expert friend, and my experience with WordPress.

Default Permalinks

I’m not going to rehash all of the details about permalinks that you can find over at the WordPress codex, but let’s start by looking at the default permalinks which look something like this:

  • Post Permalink: example.com/?p=123
  • Page Permalink: example.com/?page_id=123
  • Category Permalink: example.com/?cat=123
  • Tag Permalink: example.com/?tag=tag-name
  • Archive Permalink: example.com/?m=201005 or example.com/?m=2010

These seem simple enough, but as you can see, this is what is generally defined as an “ugly permalink”.

Suggested Permalink Structure

There are a lot of different ways you can edit the way this looks, but the one that makes the most sense to users and to search engines is for the URL to make a path directly to the resulting page, the only interruption being a categorization for posts. These resulting permalinks will look like this:

  • Post Permalink: example.com/cat-name/post-name
  • Page Permalink: example.com/page-name
  • Category Permalink: example.com/cat-name
  • Tag Permalink: example.com/tag-name
  • Archive Permalink: example.com/2010/05 or example.com/2010

To set your structures to this, use this as your custom structure: /%category%/%postname%/ and then leave the tag and category bases blank.

Remember that words that come after your URL are going to look like directories, even though they aren’t really. For instance, you might look at the path to an image that looks like this: example.com/mydesign/images/logo.jpg. On your server, there is a public root directory after which there is a directory called “mydesign”, and then inside that there is a directory called “images”. In graphical user interfaces, these are generally represented as folders within folders. So if you have a permalink like this: example.com/category/cat-name, a search engine and even some users, are going to assume you have a directory on your server called “category” and then another called “cat-name”.

That being said, when you use my suggestion for your permalinks, and you have a post called “Hello World” in the category named “General” your permalink will be this: example.com/general/hello-world, and your category’s permalink will be “example.com/general”. This is good since when a search engine gets to the /general/ part of your permalink, it’s going to index that pseudo directory as well. Thanks to your permalink structure, that will result in a page with topics in that category, rather than a 404 error page, which isn’t a good thing for a search engine to find.

Don’t Skip This: Remove Category and Tag Base

By now, you’re probably noticing that your categories look like this: example.com/category/cat-name. By default, WordPress will insert a default category base of “category” and tag base of “tag”, but since the directories “category” and “tag” don’t exist we want to remove these. This is pretty simple to do with this plugin: WP No Category Base.

Search Permalinks

It is noteworthy that no matter what your permalink structure is, your search permalink will always be the same: example.com/?s=searchterm