Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

SEO Friendly URL Structure for WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
SEO Friendly URL Structure for WordPress

WordPress URL Structure by default is not the most Search Engine Friendly, and it is also not very user friendly. In this tutorial we will show you how to make SEO Friendly URL Structure for WordPress that are also user friendly. If you see us use Permalink structure instead of URL structure, you should know that they are synonymous.

Why SEO Friendly URL Structure

When you have a SEO friendly structure, you are increasing your chances of ranking higher in search engines such as Google and others. Which by default are the largest source of new visitors to any website. In our experience with SEO, we have seen that Google gives extra weight to the URL structure therefore it is recommended that you follow this tutorial.

Begin Process

By default WordPress URL Structure looks a bit more robotic because it is not user friendly at all let alone not being SEO friendly.

Above is an example of what a default WordPress URL structure looks like. The goal of making the URL structure more friendly is that your users should know before reading the article what it is about by just looking at the URL. The same goal is to be accomplished for Search Engines as well.

Step 1: Open the Permalink Option Page

Settings / Permalink Option in WordPress

First you need to open the Permalink Option Page which you can find in your WordPress Admin Panel if you click on the Setting Tabs and then go to Permalink. There you should see something which looks familiar to the image above.

You would need to click on the fifth option which says Custom Structure.

Step 2: Pick Your Structure from Documentation

There are many ways a URL can be organized. WordPress gives a few options which you can see at two, three, and four. But those are not the best option in our opinion.

We recommend the URL Structure of


or if someone wants a completely static site, then they can use the version below.


By using that documentation your URL structure will be keyword rich as it will contain the keyword of the category and the title. Like the one below:

Now while we recommend the options above there are multiple other ways you can organize your URLs. We have seen many different options in use. To know the possible URL Structure combination, you will need to learn a few documentation tags.

%year% – The year of the post, four digits, for example 2004

%monthnum% – Month of the year, for example 05

%day% – Day of the month, for example 28

%hour% – Hour of the day, for example 15

%minute% – Minute of the hour, for example 43

%second% – Second of the minute, for example 33

%postname% – A sanitized version of the title of the post (post slug field on Edit Post/Page panel). So This Is A Great Post! becomes this-is-a-great-post in the URL.

%post_id% – The unique ID # of the post, for example 423

%category% – A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI.

%author% – A sanitized version of the author name.

More information about the tags can be found in WordPress Codex for Permalinks.

Once you have selected the combination, paste it in the field and click “Save Changes”

Your .htaccess file will automatically be updated, and your URL will be changed. We suggest that you do this towards the start of your website, so you don’t have to go through the process of re-indexing in search engine.

Good Luck with Ranking High in Search Engines.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Vinit says:

    In the permalinks settings, I am getting options as as default.

    I do not want the /blog part as a part of my permalink. What can be done?

  2. YANHR says:

    I start using WordPress since a few weeks ago. Totally blank with WP structure.
    Luckily i found your website. Thank you so much.

  3. Manasa Jain says:

    I too did the same thing as Muhammad.. I changed the URL from /%postname%/ to /%category%/%postname%/ . The URLs look fine. But when I access them, the page is showing 404 error.. what might be the issue?

  4. Arthur Gopak says:

    I have the same question!

  5. Mohit says:

    One Question
    if we remove /%category%/ from URL. Its show broken link in that URL why ? How to Solve that …

    Second Question :
    In below option which one is better for SEO ,
    Some people are claiming Google used to spider pages ending in html faster than those ending in
    php (Google assumed a page ending in php might be dynamic and slowed
    But if we used .html its doing 301 re-direction because of that downtime of that page become slow …
    Please it will be great help if you can answer …

  6. Deedee Davies says:

    Thanks – this was much more help than the standard WP documentation!

  7. Eavan says:

    Hi there, thanks for this great tip. One question: what will be shown in /%category%/ if I have more than one category assigned to a post? Will it generate a very long URL or just use the first category?


  8. Minakshi Choudhary says:

    Thankyou so much for sharing your valuable information.. it was really helpful for me and my team..thanx again .. keep sharing!

  9. Sanjay Kumar says:

    I am using /%category%/%postname%/ on my website but i seen a matt cutts video that he said that to remove category from the url is the better to archive, is it good for us as seo ranking, please tell me the answer!

    • WPBeginner Support says:

      SEO is about trial and error, testing and retesting. What works for one website doesn’t always work for other websites. We are using category in our URL structure on WPBeginner and it works for us.

  10. Akash Deep Satpathi says:


    Is using only %postname% is not good for SEO? As I am currently using this, but was thinking to use %month%/%year%/%postname%/ on my blog, as I don’t want to use categories. So is using those would be good?


  11. Muhammad Kamran says:


    I am currently using /%postname%/ . I was thinking of changing it to /%category%/%postname%/ . Will my old URLs with /%postname%/ be redirected to the new URL automatically. Or do i need a 301 redirect.

    If i need 301 redirect can you tell me what it will be?


    • Editorial Staff says:

      Don’t change it unless you have a very good reason to do so. You’ll lose SEO rankings, and it is just a hassle.

  12. Bobby says:

    Sweet! Thanks for the tip! Thankful that it was super easy and did not break my site.

  13. Damir says:

    Been trying to find answers to permalinks but when I use the suggested method here my web page displays 404 error Page not found, although the url looks correct but no page.

    I get, in the browser
    but the page says:
    404 Not Found

    The requested document was not found on this server.

    Site works perfectly with the default

    What am I missing?


    • Editorial Staff says:

      This means that WordPress is unable to write to your .htaccess file. Please make sure that it exists.

  14. orest says:

    very usefull info and easy to implement thanx. With your help I managed to create friendly urls, but i have a further question..Is it possible to have multilingual friendly urls?? For the time being i have set the url to show the post name, but since the post name is in my native language when someone clicks on the english version it keeps the exact url and adds ?lang=en in the end, but such a url would make no sense to someone who cannot read my native language. Any solutions to that?thanx

  15. sibtiger33 says:

    any plugins which you recommend for doing this?

  16. Haydn says:

    I have a static site as there is no blog. I am using your suggested %category%/%postname% regime, thanks for that. On the gallery page I have root/gallery/ when I open an image it stays the same is this acceptable or should it be seen as root/gallery/image.jpg etc?

    I like your site, useful even if I am not blogging

  17. Tim says:

    Wait, I don’t understand something here. It sounds like you’re saying I need to go through and change the URL of every post on my site which sounds like a huge pain in the ass. Is that what you’re saying? I’m just trying to set up a custom structure so I can use the W3 Total Cache plugin I just installed. Why do I need to change the URL for every post?

    • Editorial Staff says:

      No we are not saying that. By changing the structure, all URLs will change to match the custom structure.

  18. Thomas D Rees says:

    What if you have like 50 pages and posts and didn’t start this at the beginning of your site as it suggests. Does it change the past posts to be SEO friendly too? And then your sitemap is totally redone? you don’t screw up your ranking in the interim do you know? Thanks

    • Editorial Staff says:

      You would have to setup a 301 redirect for your previous posts to the new links. There are plugins out there that can do this. Furthermore, yes you will loose the rankings on those pages for the time being, but because of the 301 redirect, you will get them back shortly as well.

  19. Gary says:

    Thank you, thank you, thank you. I have been looking for about 3 hours for any easy explanation of how to best arrange my permalinks and I finally found it here. Just what I needed. I do have one question though. How do some blogs get there url’s to display as just root/postname? Thanks again!

  20. Indrawan says:

    I have a problem with permalinks. In my blog, I use /%category%/%postname%.html . Some posts have a variety of categories, for example Category Featured and Gadget Reviews, for the new post, the url becomes /featured/laptop-review-2010.html but when the category features removed, the url becomes /gadget-review/laptop-review-2010.html. So, How do I set /gadget review/ as a default permalink for new posts or old posts which category features deleted? Thank you.

    • Editorial Staff says:

      The best option would be to create a 301 redirect and make all old posts to be redirected to the new category structure.

  21. Melvin Ramos says:


    As the wordpress documentation and as another reader suggest this organization can bring performance issues.

    I know you told about this will be only an issue if the site/blog is realy big.

    I wonder: Using the Category base can be a win/win solution?



  22. Kim K says:

    Hi! I have WordPress 3.0.3. I installed the WP Super Cache Plugin. I am to the Permalink Options/Settings page. I get where you go to structure but I do not get it after that??? I do not get the category post name thing?? Thanks Kim

  23. Kavita says:

    I use month and postname in my permalinks. Thanks for tips

  24. S.M.Karthick says:

    Excellent! Thanks!

  25. Giorgoscy16 says:

    Thanks a lot. . . this was exactly what i was looking for

  26. Todd says:


    Sorry if this is a silly question, but do you still need this plugin with WordPress 2.9

    It seems like it does an ok job of handling URLs or am I seriously mistaken.

    Again, apologies if this is a very basic question.


    • Editorial Staff says:

      This is not a plugin. It is a built-in feature and we recommend you that you get one of the url structures that we suggest.

  27. Adam Baird says:

    Root/Category/PostName is a great structure for SEO. You are absolutely correct.

    However, for anyone with a significant number of posts and pages on their wp website, you’re going to create a pretty large problem as their database is going to receive an enormous amount of strain from WordPress trying to figure out whether each URL is from a page or post.

    If you use a numbererically based URL structure, such as Root/Month/Year/PostName, you’ll avoid that problem. It might not be perfect in terms of SEO, but its not exactly horrendous either…and your site is much more scalable.

    • Editorial Staff says:

      Adam, you bring up a really good concern here. But sites that are very huge, will have excellent database caching, and WordPress caching. Their servers should be strong enough to handle these tiny requests. While the solution you suggest is not horrendous, it is definitely not the most SEO friendly way either.

      Also, note that this type of problem may occur on really really large sites.

  28. Jessica Lambert says:

    Hey, I am currently making a YouTube video about something simular, would you mind me using you as a reference? I’ll be sure to give you a link within the video.

  29. sedhot says:

    thankz for this tutorial sir ..

    try to use it :) , but how if we use 2 category or more for one article ??

  30. pere says:

    Thanks for the article! However, something doesn’t work. I cannot apply the changes because there are no rights to write the file. When i look for the file in my server i don’t find it… so i create it. However, when i upload it in the server via ftp the wordpress admin page is down. when i delete the file wp admin page is back. Although I read about it I still don’t know how to solve the problem. Any help? Thanks in advance!!

    • Editorial Staff says:

      You were not suppose to create any file with this tutorial. What are you talking about?

      • pere says:

        well, i’ve read everywhere that if the .htaccess file doesn’t exist… you have to create one. and i don’t see it in the folder of my server, so i created one. but it looks i was wrong… :) i am just lookig for this file to make it writtable and apply all the good pieces of advice you give in this post. and the thing is that i don’t find the .htaccess file. in which folder it is supposed to be? thanks!

        • Editorial Staff says:

          If you are using cPanel hosting, you won’t see .htaccess through your file mananger. This file is found in the root directory, but can be found in other directories as well.

        • Steve Warriner says:

          To create the .htaccess file, on your computer create htaccess.txt (windows does not allow files to start with a [.](dot). This file should be blank.

          Upload it to the default upload directory (ususally something like /public/ or /public_html/ etc. I looked to see where my wp install had a .htaccess file and found one there and also in my wp-admin directory. You could also upload to there and after you make the changes to the url structure, check and see which one the server wrote to, delete the one that didn’t change.

          After you upload them, change the name to .htaccess from your ftp or however you access your files on the server. On my server they need permissions=644, which is owner has read and write permissions, group and public have read permissions.

          Does this help?

        • Editorial Staff says:

          WordPress automatically rewrites your .htaccess file on most servers. And yes you can create a .htaccess file in Windows. Just open a notepad and save it as .htaccess

  31. Tinh says:

    Excellent tip, but I have a question that if I change permalink structure, are those backlinks and trackbacks broken? How to deal with this?

    • Editorial Staff says:

      You can use Platinum SEO, and it has a built in option of 301 Redirects, so if you change any of your URLs, it will automatically change the old urls to direct to the new one. So trackback and backlinks will never be broken.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.