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:




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:



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%/ 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.

Tags: , , , ,

Categories: Wordpress Tips - Tricks - Fixes

31 Comments to “Permalinks WordPress – Custom Permalinks WordPress, Best WordPress Permalinks Structure”

  1. Mike says:

    Hello, I did or so I think I did everything that is suggested to make my site secure, but now when I try to view the comments it gives me this;

    “This is somewhat embarrassing, isn’t it?
    It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help.”

    Not sure what I did wrong in the process … ?

    Thank you for your time on the matter …. Mike

  2. kayache says:

    The best practice of “start with a numeric field” seems to no longer be necessary from WordPress version 3.3 forward. So, simply having /%postname%/ would not be a performance hit. see:

    • AITpro Admin says:

      Yes, that is correct, there is no longer a need to start your custom permalink structure with a numeric tag.

  3. himanshu says:

    this product is awesome it helps me to secure my website from anytype of hacking and any other type of viruses or any other type of problem

  4. Rohit says:

    Thanks It will help me to select permalink structure for my blog.

  5. […] not work with this permalink hack.  You will need to change your custom permalink to a standard WordPress custom permalink structure in order to be able to use BulletProof […]

  6. Nick says:


    I’m looking to change my permalink structure from /%post_id%/%postname%/ to /%year%/%postname%/ . You’ve said that “your existing links will be rewritten by WordPress to the correct new URL’s”, but wouldn’t this still create SEO problems with duplicate content? Wouldn’t i have to use a third party 301 directory plugin to correct this?

    Hope I make some sort of sense. Thanks.

    • Nick says:

      And what if I were to move from /%year%/%postname%/ to wordpress’ /year/month/sample-post ? Would this still create the same problem as above?

      • AITpro Admin says:

        The example was only including just the numeric %year% tag. You can of course include any other valid numeric tags. The numeric field permalink structure tags are: %year%, %monthnum%, %day%, %hour%, %minute%, %second% and %post_id%

  7. domus says:

    hope you can help me. I am new at this so I tried bp but it seemed to break my links and after trying to fix I decided to restore all as it was before and try again later but when I put permalinks back to default I got booted out of the wp dashboard and could not login at all. I then removed a htaccess file in my root that was there before I installed bp and could login to wp and my site had the links working but I still cannot go to permalinks or menu tabs…I get booted out. hope I have made enough sense for you to help me. thank you so much.

    • AITpro Admin says:

      I would need more specific information to be able to assist you.

      It looks like you are doing something with redirection or you have a “Giving WordPress Its Own Directory” (GWIOD) WordPress setup. Your main URL goes to this folder “/shop”.

      And I just took a look at your website and it looks like you have a blank space at the top of either your Theme header.php file or your wp-config.php file, which causes this exact problem. You need to remove the blank space from the top of the file that has the blank space.

      Normally all you would need to do to get back into a standard WordPress site is to delete the BPS .htaccess file that is in the root folder, but it looks like you do not have a standard WordPress installation – you are doing something with redirection, GWIOD or maybe something with DNS since your main URL goes to the /shop folder.

  8. Tony Payne says:

    I am moving my site to a new host and want to change the permalink structure.
    I have some code (from Yoast) that is a redirect which is supposed to be added to the top of the .htacces file, however since I am using both WP Super Cache and BPS the .htaccess file is horribly complex (for a novice like me) and I am sure that the redirect needs to go somewhere in the middle. I would rather add this in the correct place. Is it possible to give me a tip please?

    The code to be added is:

    RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$$3

    and is supposed to change the old permalink structure of year/month/postname to just postname.

    Thanks in advance.

    • AITpro Admin says:

      RedirectMatch can go anywhere before # BEGIN WordPress in the Root .htaccess file or after # END WordPress. I am not entirely sure what you are trying to achieve so i can’t really help you with the .htaccess code itself and this statement makes no sense to me – “..and is supposed to change the old permalink structure…”. Yeah maybe temporarily, but not really permanently. You would need to create the correct rewriterules for the new site and not try and do some sort of tinfoil and coat hangars thing. 😉

      • Tony Payne says:

        Thanks. It’s really only so that any backlinks to posts on the old site will still be correct on the new one. Since I have a half decent “Not Found” page, maybe it’s best to leave it as is rather than to add the redirect, which I assume will only slow things down further.

  9. Francis says:

    How do I enable Permalinks? Now in Settings it is default what is checked but I get a warning that I should enable them to make your Plugin work. I am a beginner so please use simple languuage. Thanks.
    (I have been hacked twice so I am happy I found your plugin, now I have to make it work)

    • AITpro Admin says:

      Click on the “Custom Structure” radio button and type in the WordPress Tags that you want to use.
      We are using these WP Tags >>> /%post_id%/%category%/%postname%/

  10. mlama says:

    Hello ,

    Am using Wp Ecommerce Plugin and Gold cart plugin
    My permalink – /%category%/%postname%/

    When I activate
    Website Root Folder .htaccess Security Mode
    Website wp-admin Folder .htaccess Security Mode

    the images in my single product pages are not visible and I have slider on the footer , where the images are not visible as well .

    But when I go to my permalinks under settings and hit the Save Changes the images are back again .
    But I then get a red error message BPS Security Status .

    Definitely I am missing some thing …

    Will be grateful for your tips and direction ….

    Thanking you !

  11. Judah says:

    Hey, im trying to use permalinks, but when i active them, the links on my site stop working and they sent me a 404 error page, so i have to go back to default in permalinks, do u know what could be wrong? :S

    • AITpro Admin says:

      *** WP or Host mail Error – an email was never sent to AITpro notifying us of this comment ***
      Most likely the cause of the error was that the custom permalink structure was entered in with the wrong format.

  12. Mart says:

    I discovered my WS was not protected by accident, re Permalinks.
    I was wondering was this because I had installed SEO Plugins? Does BPS have any way of flagging up when security has been compromised by a plugin or something, other than by accessing the BPS plug in itself by chance?

    • AITpro Admin says:

      The current version of BPS does not check plugins for security issues or alert you if a security vulnerability is found with another plugin. If BPS is enabled it just provides security protection against vulnerabilities. You have brought up an issue about BPS alerting that I will be adding to the next version of BPS – a warning popup that displays throughout the WordPress Dashboard, not just in the BPS settings page, that BulletProof Mode is not enabled or Maintenance Mode is activated. Thanks.

  13. […] Permalinks WordPress – Custom Permalinks WordPress, Best WordPress Permalinks Structure […]

  14. Reza says:

    Dude, I do appreciate your efforts. You should join WordPress team. in fact they should invite you. Cheers

  15. Manfred says:


    my current permalink structure ist /%year%/%month%/%day%/%postname%/, as it has always been for the last three years since I started in 2007. Now I am trying to improve my SE-rankings. Is it from an SEO point of view disadvantegeous to leave /%month%/%day%/? Would it be better to change to, f.e., /%post_id%/%postname%/?

    • AITpro Admin says:

      Actually they are equally both just as good. The SEO benefit is coming from just postname. The performance would be the same for both your current permalink structure using the date structure tags or using the post_id structure tag so you should keep what you already have because it is perfectly fine already. Although I have heard the argument that if you are using a date in your URL that this would affect your links by “dating” them. Meaning that if someone did a search for something and added the year or month to the search then your post might not be ranked as high in the search results. Personally I don’t think this would happen, but I have never tested this by performing searches with and without the date for a particular search term. And since you are using the date permalink structure I would be curious to know what you find out if you test this theory. Thanks.

  16. […] Permalinks WordPress – Custom Permalinks WordPress, Best WordPress Permalinks Structure […]

Skip to toolbar