How To Optimize Your Permalinks To Increase Website Speed
As you probably already know, there are good permalinks and there are bad ones. When you have a website with a lot of pages and posts combined with a permalink structure which is not optimized, you might bring it to a crawl.
Now with permalinks we have to be careful because an SEO friendly permalink might not necessarily be a good permalink for performance and vice versa. So where is the balance between the two?
Well from an SEO perspective a good permalink is one which includes the postname and maybe the category as well, like the examples below:
Example 1: www.mydomain.com/postname
Example 2: www.mydomain.com/category/postname
But when it comes to performance it is not a good idea to start your URL structure with a postname, tag, author or category field. The reason behind this is that these are text fields and when used at the beginning of a URL it makes it very complicated for Wordpress to distinguish between a post URL or a page URL.
Posts and pages use both the page slug within their URL and Wordpress stores a lot of extra information in its database in order to compensate for that and be able to distinguish between posts and pages. Therefore, from a performance point of view it's best to start you URL structure with a numeric field such as the the year or post ID.
What does this mean? It means that the most popular SEO permalink structure (like examples 1 and 2 above) is bad for performance.
But can't we have both, SEO & Performance? Absolutely! We just have to follow both requirements (i.e. start the URL with a numeric field and always included the postname and/or category fields in our URL - see below).
What An Optimized And SEO Friendly Permalink Looks Like
Well it basically has the following characteristics:
- It doesn't start with text fields like tag, author, category, postname
- It starts with a numeric field like the year number
- It ends with postname or category/postname so that it points to an individual post
So, examples of Optimized AND SEO Friendly permalinks would include:
Example 1: www.mydomain.com/year/postname
Example 2: www.mydomain.com/year/category/postname
Example 3: www.mydomain.com/year/month/postname
Example 4: www.mydomain.com/year/month/category/postname
Example 5: www.mydomain.com/postid/postname
Example 6: www.mydomain.com/postid/category/postname
Needless to mention that if you want to follow the above recommendations you will have to do it for your next new site or a site which you have just started working on and doesn't have a back-linking legacy on it. Because in that case, if you change your permalink structure you just compromise your entire back-linking efforts.
Running with the CDN though is a massive improvement for most people, I now run most sites with static content on cloudfront and the difference is out of this world.
FYI Cloudfront have added Sydney Australia to their CDN... makes them a winner in my book!
Nice guide though.
i tried a few more pics to "smush" and now they show up "BLANK" how do i get them back? this does NOT work
case in point:
http://bonestrivia.com/bones-season-eight-begins/bones-season-eight
this is one pic "smushed" out of about 12 that i tried this on. how do you reverse this ??????
i guess i have to redo that work completely if I want pictures to show UP