SEO Permalink for WordPress – the real deal

Ash Nallawalla

4 July 2009

SEO

I must credit my friend Prashant Karandikar tipping me off to an intriguing post entitled “Many SEO Experts Give Wrong Advice Regarding WordPress Permalinks” by Weberz-Rob. That’s a great linkbait title if you ever saw one, particularly when he began naming these well-known SEOs who gave this “bad advice”, such as:

For good measure, he also listed other well-known SEOs who weren’t giving this “bad” WordPress permalink advice but had “bad” URLs, e.g.

So how does this unknown (to me) person presume to give advice to the A-list of SEOs? Read his post for the details, but he has WordPress Codex on his side. It says:

For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to start your permalink structure with a numeric field, such as the year or post ID.

The permalink structure of this blog used to be:

/%category%/%postname%-%post_id%.html

So, this was not the optimum URL structure according to the WP Codex, as the code would waste time evaluating whether a URL is a post or a page. Now this blog is not heavily visited enough for me to care about fractions of a second, but I like to use best practices. I have opted not for the advice of Weberz-Rob or the WP Codex, but the following:

/%postname%-%post_id%.html

I agree with Andy Beard‘s comments in that post and have also settled on the filename ending in .html because I’d like an easy .htaccess solution for my indexed pages that would otherwise lead to 404s. Removing the %category% from the URL was easy.

Revised .htaccess

This is what my .htaccess file looks like:

Options +FollowSymLinks -Indexes
<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteRule ^[^/]+/([^/]+)\.html$ http://www.netmagellan.com/$1.html [NC,R=301,L]
 # BEGIN WordPress
 RewriteCond %{SCRIPT_FILENAME} !-f
 RewriteCond %{SCRIPT_FILENAME} !-d
 RewriteRule . /index.php [L]
 # END WordPress
</IfModule>

Ash Nallawalla

Search strategist experienced in large, complex websites. Ash's Google+ profile

Related Posts

Automated Facebook “Community Standards” decisions are getting ridiculous.

Ash Nallawalla

18 March 2020

SEO

Feel free to share...FacebookTwitterRedditStumbleUponLinkedinemailI shared an article from the Sydney Morning Herald that I saw on Facebook, with my comment ” Interesting analysis of the UK approach” – that is all I said. I think there were some interactions on that post. Today I received a notification (screenshots follow). I had no option to discuss […]

Read More

DMR-EZ48V recording from an external device

Ash Nallawalla

23 February 2020

SEO

Feel free to share...FacebookTwitterRedditStumbleUponLinkedinemail If you, like me, have a Panasonic DMR-EZ48V VHS and DVD writer combo device, you will have had experience in copying from VHS tapes to DVDs, or vice versa. It’s a great way to dispose of old, grainy home videos that were saved on VHS tape. Such devices were hard to […]

Read More

3 Comments

  • Fragmentedblog on 29 August 2009

    First off what is Permalink? I have both free and self hosted blog. But never needed to think about it.

    • Ash on 29 August 2009

      A permalink is the permanent URL of a post. It is the one you get to when you click the title of a post.

  • dNoxs on 1 October 2009

    /%category%/%postname%-%post_id%.html was real ?

    hmm I like use permalink /%category%-%postname%.html to user and seo friendly.

    so I change / white – to Interactive permalink :mrgreen: 😆

Comments are closed

Older Posts