Follow @BPSPro

Permalinks WordPress – Custom Permalinks WordPress, Best WordPress Permalinks Structure

31 Comments RSS Site Feed Author: AITpro Admin
Published: January 20, 2011
Updated: November 9, 2012

The best WordPress Permalink Structure for best website performance and including SEO keywords in the URL follows these 3 simple rules below.  This post is intended to point out the best permalink structures to use and not to re-explain what has already been explained regarding WordPress permalinks on the 3 reference links below.  I will be explaining custom permalinks in general and in laymans terms with a couple of examples.  Take a look at the 3 links on this page for reference to verify all the technical and logical reasons for following these permalink rules. 

NOTE:  As of WordPress 3.3 you no longer need to add a numeric Tag before a Text Tag for performance reasons.  So basically the best Custom Permalink Structure would now just be simply /%postname%/ for SEO purposes.

  Your permalink structure should start with a numeric field not a text field structure tag.  
  Your permalink structure does not need to include a category structure tag.  A category structure tag may offer a very slight SEO benefit, but the benefit is probably very little if any.  Your post name structure tag on the other hand is very important for SEO.  If you want to include a category structure tag in your permalink structure it is a text field structure tag so it should not come first in your custom permalink structure.  A category structure tag used correctly will cause a slight loss of website perfomance.  A category structure tag used incorrectly will cause a very significant loss of website performance.
  Your permalink structure should end with a structure tag that points to an individual post. 
     

WordPress Permalink Examples:

The numeric field permalink structure tags are:  %year%, %monthnum%, %day%, %hour%, %minute%, %second% and %post_id%
The text field permalink structure tags are:  %postname%, %category%, %author% and %tag%
You could also create you own additional custom structure tags, but that would require creating your own custom taxonomy tags (coding work).

1.  Permalinks for Best Performance:

/%year%/%postname%/

/%year%/%post_id%/

/%post_id%/%postname%/

The examples above follow the 3 basic rules for creating a permalink that has the best performance:  permalink structure starts with a numeric field structure tag, the category text field structure tag is not used at all and the permalink structure tags ends with structure tags that point to individual posts.

NOTE:  As of WordPress 3.3 you no longer need to add a numeric Tag before a Text Tag for performance reasons.  So basically the best Custom Permalink Structure would now just be simply /%postname%/ for SEO purposes.

2.  Permalinks for Best Performance and SEO:

/%year%/%postname%/

/%post_id%/%postname%/

The example above does not include the /%year%/%post_id%/ permalink structure because you would end up with an URL that would look like this /2011/1234.  This would obviously not be a good permalink structure to use for SEO.

3.  Permalink for Good Performance and SEO:

/%post_id%/%category%/%postname%/

AITpro.com is currently using this WordPress Permalink Structure even though it comes with a slight decrease in overall website performance.  This permalink structure choice is for personal reasons and the slight decrease in website performance is an acceptable tradeoff for our intended reasons.  Using the %category% structure tag is not recommended.  The recommended best permalink structures would be the examples shown in example 2.

WordPress Permalink Reference Links

WordPress Codex – Using Permalinks

Why Not to Use Category in Permalinks

WordPress Permalinks – Scaling, Performance and SEO

Permalink Questions

Will changing my permalink structure break all my existing URL links?

No.  Your existing links will be rewritten by WordPress to the correct new URL’s.  The rewrite may cost you a quarter of a second delay until your new links are re-indexed by the search engines.  If you are using a sitemap plugin like Google XML Sitemaps then this process is sped up significantly.  After you update your WordPress Permalinks you may need to rebuild your sitemap.  Check your sitemap to make sure the correct new URL’s are displayed in your sitemap and if not rebuild it.

Will just updating my current custom permalink structure write to my existing root .htaccess file for BulletProof Security?

 Yes.  If you already have a custom permalink structure that is working for you then just update your permalinks FIRST and WordPress will write the .htaccess code to Your Current Root .htaccess File.  Copy the htaccess code that WordPress writes to the active root .htaccess file (shown below) and paste it into the BulletProof secure.htaccess file (overwriting the existing # BEGIN WordPress… section of code only), click the Update File button to save the edit you just made to the secure.htaccess file and then activate BulletProof Security Mode.

This is the ONLY code that you need to copy from your existing active root htaccess file to the BPS secure.htaccess file (if you have MU the code will look different – just copy that code to the secure.htaccess file):

 
# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Where and How do you change or update your WordPress Permalinks?

Click Settings >>> Permalinks >>> select Custom Structure radio button >>> type in the permalink structure that you want to use >>> click the Save Changes button.  Now go to the BulletProof Security File Editor and click on the Your Current Root htaccess File menu tab and you will see the new .htaccess code that WordPress has written to Your Current Root htaccess File.  If you do not see that any new .htaccess code has been written to your existing root .htaccess then try refreshing your browser.  Also double check to make sure that you are looking at the correct .htaccess file.

WordPress Permalink Structure

Modifying the custom permalink structure for WordPress installed on an IIS web hosting server

BulletProof Security should not be installed if you are using an IIS server for web hosting. IIS does not support mod_rewrite. Check with your web host and also read this WordPress Codex for more information on using Permalinks without mod_rewrite.

Skip to toolbar