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

What is a SEO Friendly URL Structure in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
What is a SEO Friendly URL Structure in WordPress

Have you ever wondered what’s the most SEO friendly permalink structure in WordPress? We’re often asked this question by new users. That’s because in the past, the default WordPress URL structure was not SEO friendly at all. However that’s changed now. In this article, we will explain WordPress SEO friendly URLs, and how you can customize your WordPress permalinks.

SEO Robot

What is a SEO Friendly URL?

Before we go too deep into WordPress permalinks, it’s important that we define what is a SEO Friendly URL.

SEO Friendly URLs contain keywords that explain the article, and they’re easy to read by both humans and search engines. They also improve your chances to rank higher in search engines.

Example of a SEO friendly URL:

http://www.wpbeginner.com/how-to-install-wordpress/

So what does a non-SEO friendly URL look like?

http://www.wpbeginner.com/?p=10467

By default, WordPress now uses the post name in the URL which is the most SEO friendly URL structure.

So why do beginners still ask us for best permalink structure?

That’s because in the past, WordPress did not use pretty URLs also known as permalinks. The default used to be the non-SEO friendly example that we shared above.

This was changed in WordPress 4.2. If you recently installed WordPress, then your site URLs are SEO friendly.

You can easily verify your permalink settings in your WordPress admin area.

The Permalink Settings Page Explained

In WordPress, links are called Permalinks (short for permanent links). You’ll see the term permalink structure and URL structure being used interchangeably.

First thing you need to do is to visit the Permalinks settings page in your WordPress admin area.

Simply click on Settings link in the admin menu and then click on Permalinks. This will take you to a page that looks like this:

Permalink settings page in WordPress

As you can see there are number of choices available.

  • Plain
    http://www.wpbeginner.com/?p=123
  • Day and name
    http://www.wpbeginner.com/2016/01/22/sample-post/
  • Month and name
    http://www.wpbeginner.com/2016/01/sample-post/
  • Numeric
    http://www.wpbeginner.com/archives/123
  • Post name
    http://www.wpbeginner.com/sample-post/
  • Custom Structure
    Choose your own URL structure using available tags.

Let us explain these options a bit, and how useful they are for users and SEO.

The first option which is called plain used to be the default WordPress URL structure. This is not an SEO friendly option.

The day and name option is somewhat SEO friendly as it has the post name in it. However, with dates, the URL becomes too lengthy. But more importantly after some time your content seems outdated, even if you regularly update it. Similarly, the month and name option also runs the risk of being dated.

However if you’re a news publication, then you want to have the dates in your URL to show the recency and improve the user experience.

In our opinion, those two structures are only good for news sites. Business sites that are hoping to create ever-green content should avoid it.

Post name option is the most SEO friendly because it is short and pretty.

If you are running a larger publication, then you can use a custom structure that can also be SEO friendly.

At WPBeginner, We use a custom permalink structure that adds a category name along with the post name in the URL. Because our site is large and contain thousands of articles, it suits us very well. You will see larger publications follow a similar URL structure.

In order to use a custom URL structure, you will need to add special tags in the custom structure box. For example, we use:

/%category%/%postname%/

Notice how each tag is wrapped between percent signs. Also notice the trailing slashes / before, after, and between the tags.

Creating Custom URL Structure with Available Tags

For the best results, we recommend using the options we mentioned above. You can copy the URL structure we use on WPBeginner or choose the post name as your URL structure.

However, there are plenty of other combinations you can create using tags. Here is a list of tags that you can use to create your own custom URL structure:

  • %year% – The year of the post, four digits, for example 2016.
  • %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). For example, if your post title is This Is A Great Post! It would become 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.

Don’t forget to click on the save changes button after choosing your permalink structure.

As soon as you press the save changes button, WordPress will automatically update your site’s .htaccess file and your site will immediately start using the new URL structure.

Warning: Important Note for Established Sites

If your site has been running for more than 6 months, then please don’t change your permalink structure.

You don’t have to use the same structure that we used.

By changing your permalink structure on an established site, you will lose all of your social media share count and run the risk of losing your existing SEO ranking.

If you must change your permalink structure, then hire a professional, so they can setup proper redirects. You’ll still lose your social share counts on the pages.

There’s only one exception to this rule. If your site is using the plain URLs, then no matter how old it is, you should update the URL structure for better SEO. Yes, you will still lose social share counts, but the benefits far outweigh that.

We hope this article helped you create a SEO friendly URL structure for your WordPress site. You may also want to see our guide on categories vs tags – SEO best practices for sorting your content.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


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 »

Comments

  1. Smriti says:

    I have been using wordpres for over 6 months now and every time I tried changing my permalink structure from plain to /%category%/%postname%/ I get a 404 error. I hit the “Save Changes” but to not use. can you please tell me what i should do? Thank You!

    • WPBeginner Support says:

      Try to backup and delete your .htaccess file. Then visit the permalinks page and click on save changes. Refresh your FTP client to confirm that WordPress has generated a new .htaccess file. This should resolve your issue.

  2. Nancy says:

    I am getting ready to move my site from wordpress.com to wordpress.org. I have about 200 posts on my wordpress.com site. I would like to change my permalink structure on my wordpress.org site to post name. I plan to use wordpress.com’s $13 a year site redirect. Will I have problems with broken links?

  3. Berk Onal says:

    I have changed permalink of my product page.

    Now i have an error message of “Duplicate meta descriptions” showing the old permalink and new permalink as duplicate.

    How to solve this problem.

  4. Andy says:

    What is considered best practice (SEO wise) for internal linking? IE. Using Woocommerce I have links in my product descriptions to options that we offer. I can use the /descriptive-link/ or the /?p=321. Intuition tells me the first is better for SEO but the programing part of my brain says the latter is “safer”

  5. Jackson says:

    This is a great article and its easily explained in layman’s terms. I have one issue that I cannot find a solution to and others may have encountered the same issue. The problem with my blog is that trashed pages. If I have a trashed page, how would I reinstate it without having to change the custom structure to the plain structure? I’ve basically ruined a blog with over one hundred and fifty pages grhhhhhhhhhhh! Any help would be appreciated please

    • WPBeginner Support says:

      Simply go to Pages and then click on trash. Take your mouse over to the page you want to restore and click on the restore link. If you want the page to not have the URL that it previously had then you can copy its contents and paste them into a new page. Publish the new page and delete the old page.

  6. Nisha says:

    Great article. I am in a fix now. I have a running site which is around 10 yrs old. Unfortunately my post urls have date in it. :(

    But it’s better late than never.
    If I opt now to have my permalink in new post structure, as you said, the older posts will also get changed.

    What is the best solution to do it. I can’t afford to hire somebody to do it manually. I can try my hands though.

    Is there any plugin or tool which will make my job easy?

    I am expecting a response from the readers as well, who have tried it first hand.

  7. Umer says:

    I am running following site. but its traffic is not consistant. i am sending you my site link. Please suggest me how i can gain more and consistent traffic and also tell me about my mistakes. Pleasae.

  8. Merry Clerk says:

    This is very nice post thanks for sharing this blog about permalinks.

  9. Shah Jahan says:

    Hello,

    I am using the redirect tool by yoast to redirect my old permalink structure to the new one, it works fine, but the wordpress admin panel not working, giving me the 404 error.

    Also the child category posts are also not working. Please guide.

    My old permalink structure was /%category%/%postname%.php
    And the new one is /%postname%/

    Thanks,

  10. Gail Palubiak says:

    Thank you for your article, it was very timely. I love WP-beginner!

    However, it still seems a bit over my head. I wish you included more examples. I’m in the process of putting the finishing touches on my website (pure DIY). I haven’t even started blogging on the site so I have been more concerned with how to get . Although I have no idea why %postname% worked but it did so I’m thrilled (%postname% just doesn’t seem to correctly call out the page I want). Anyway, I still don’t have a clue what is meant by “categories”. I appreciate the link you shared, however, it’s still written beyond my pay grade. It says in the article, “WordPress comes with the ability to sort your content into categories, tags, and taxonomies.” It never explains WHY this is useful. Would you mind sharing a bit more on categories from a user point of view please?

  11. Avdesh says:

    Hi, I recently moved my blog from BlogSpot sub-domain to my custom domain on WordPress. After reading through the stuff available online, I chose the ‘Month and Name’ permalink in the WordPress as its being mentioned that this is most similar to what BlogSpot uses and if one is transferring from BlogSpot to WordPress, then one should chose this permalink only in order to loose existing traffic and Google Page Ranking. Now, after reading your article above, it seems that the best permalink would be “Postname’ permalink. Can you please guide me whether I should change my permalink to ‘Postname’ or should I keep it to ‘Month and Name’ permalink?

  12. Toublanc says:

    Hi, this is a very good post about permalinks, thank you.
    I have a question about it, is it possible to use regex to dynamicaly rewrite category name in the URL?

  13. Jean-Pierre says:

    Hello! I use custom /%category%/%postname%/ . The categories are English and Farsi (using Arabic characters). The permalink in sitemap for farsi turns to:
    /farsi/sms-%d8%a7%d8%b3-%d8%a7%d9%85-%d8%a7%d8%b3/

    This is not helpful for SEO. Can you help please? thanks.

  14. Chuks Guide says:

    Great post. I was using custom pemalinks structure just like u mentioned earlier on my site but when i changed to post name permalink i lost my previous links i shared on social media pages which resulted to error 404.

    You just made me understood why.

  15. mohamed salad omar says:

    how to change post categorie number want only one categories dispalyed in website feated

  16. Jamshaid Ali says:

    Useful Content for the beginners. I also got some new tips from here. Thanks for sharing.

  17. Gerardo says:

    Hi, i have a question about the permalink structure:
    Before to use wp.org i had used wp.com with date+name of post (by default).
    Now on wp.org i try to use only the name, but the social link not working, so to fix i have setting post id+name to have a post name and a little numbers before.

    Do you think it a good idea? Because all permalink working fine, just only name not working, so i think used id+name could be a good idea

    Thanks

  18. Richa Kamal says:

    Hello! I had a question regarding custom tags. What if I have to use same or similar title, e.g. for outfit post? Is it a good idea to add a numeric value to the URLs as well. I am skeptical about using %post_id% as it will be sequential then and can make some other posts seem out-of-date. How about adding a random number to the URL like tumblr posts. How can we configure it to be part of URL just like categories?

  19. Dan Awontis says:

    Nicely written. I was absolutely able to understand and follow everything, and to lear, which is the most important thing.

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.