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

SEO Friendly URL Structure for WordPress

Last updated on by
Follow WPBeginner on YouTube
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.

http://wpbeginner.com/?p=25

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

/%category%/%postname%/

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

/%category%/%postname%.html

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:

http://www.wpbeginner.com/wp-tutorials/how-to-install-WordPress-on-your-site/

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 lovers 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 »
  • http://www.privus-wm.com Arthur Gopak

    I have the same question!

  • Deedee Davies

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

  • Eavan

    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?

    Thanks!

  • Minakshi Choudhary

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

  • Sanjay Kumar

    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!

    • http://www.wpbeginner.com/ WPBeginner Support

      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.

  • Akash Deep Satpathi

    Hi,

    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?

    Thanks!

    • http://www.wpbeginner.com Editorial Staff

      You can definitely use just the postname.

  • Muhammad Kamran

    Hi.

    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?

    Thanx

    • http://www.wpbeginner.com Editorial Staff

      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.

  • Bobby

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

  • Damir

    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, mysite.com//help-desk/ 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 mysite.com//?page_id=338

    What am I missing?

    Thanks

    • http://www.wpbeginner.com Editorial Staff

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

  • orest

    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

  • sibtiger33

    any plugins which you recommend for doing this?

  • http://williamsguitars.co.uk Haydn

    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
    Thanks

    • http://www.wpbeginner.com Editorial Staff

      If the images are opening in the lightbox, then it won’t change the url..

  • http://www.smokinhotreefer.com Tim

    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?

    • http://www.wpbeginner.com Editorial Staff

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

  • http://soberlivingsearch.com Thomas D Rees

    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

    • http://www.wpbeginner.com Editorial Staff

      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.

  • http://www.gbgliquidvitaminbusiness.com Gary

    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!

    • http://www.wpbeginner.com Editorial Staff

      /%postname%/ << Use this one.

  • http://vistandra.com/ Indrawan

    Hi,
    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.

    • http://www.wpbeginner.com Editorial Staff

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

  • http://www.selfhelp360.com Melvin Ramos

    Hi,

    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?

    ie: mysite.com/blog/category/postname

    Regards,
    Melvin

  • http://www.kimscandid.com Kim K

    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

    • http://www.wpbeginner.com Editorial Staff

      Just copy and paste this code in the custom structure: /%category%/%postname%/

  • http://www.sfihomebizz.com Kavita

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

  • http://twitter.comsmkarthick S.M.Karthick

    Excellent! Thanks!

  • http://www.themovieprofs.com Giorgoscy16

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

  • Todd

    Hi,

    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.

    T

    • http://www.wpbeginner.com Editorial Staff

      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.

  • http://rockingwp.com Adam Baird

    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.

    • http://www.wpbeginner.com Editorial Staff

      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.

  • http://www.diversion-safe.info/what-to-consider-when-buying-safes-for-the-home Jessica Lambert

    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.

    • http://www.wpbeginner.com Editorial Staff

      Sure you can use us as a reference :)

  • http://sedhot.info sedhot

    thankz for this tutorial sir ..

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

    • http://www.wpbeginner.com Editorial Staff

      If you use subcategory, then it should show /parentcategory/subcategory/url

  • http://www.peresola.com pere

    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!!

    • http://www.wpbeginner.com Editorial Staff

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

      • http://www.peresola.com pere

        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!

        • http://www.wpbeginner.com Editorial Staff

          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.

        • http://jedsweb.net Steve Warriner

          @pere
          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?

        • http://www.wpbeginner.com Editorial Staff

          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

  • http://blogviet.info Tinh

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

    • http://www.wpbeginner.com Editorial Staff

      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.