SEO Friendly URL Structure for WordPress Blogs

SMS Text

As some of your have noticed, we changed the URL structure on Search Engine Journal entries today from the classic “/?=4556” to “/seo-friendly-url-structure-for-wordpress-blogs/4556/” on all Search Engine Journal posts.

I had not done this before because of 4 years of incoming links to SEJ stories which used the old URL structure, and fear of duplicate content issues if redirects did not work correctly. With some help from SEJ co-author (who some of your may recognize from his days at Ahmed Bilal, we made the switch with little effort.

Step 1 : Go to the ‘Customize Permalink Structure’ page in your WordPress Admin : Dashboard>Options>Permalinks

Wordpress Permalink Structure

Step 2 : Then select the ‘Custom Structure’ Option. We only wanted to list the Post Name and Post ID number in the URL, so we customized it as /%postname%/%post_id%/

A full list of customization options is available at

Step 3 : Don’t save the new Permalink Structure yet! Before updating your Permalink Structure, install and activate the Permalink Redirect WordPress Plugin. This lets you bypass mod_rewrites or changes to your .htaccess file.

Permalink Redirect WordPress Plugin replies a 301 permanent redirect, if requested URL is different from entry’s (or archive’s) permalink. It is used to ensure that there is only one URL associated with each blog entry, therefore eliminating dupicate content issues.

Step 4 : Go back to your ‘Customize Permalink Structure’ page in the WP Admin and hit the ‘Update Permalink Structure’ button.

Now all of the posts on your blog will have the new SEO keyword friendly URL structure and all incoming links which point to the old URL’s will be directed to the new optimized URL’s.

As an added bonus, if you change the Post Slug in your blog posts while Writing new posts or Managing older ones, the URL will reflect the keywords in your Post Slug and not the entire title given to a post. If you notice, I’ve simplified the URL for this post to read “/seo-friendly-url-structure/”.

Wordpress Post Slug

Loren Baker
Loren Baker is the Founder of SEJ, an Advisor at Alpha Brand Media and runs Foundation Digital, a digital marketing strategy & development agency.
Loren Baker
Subscribe to SEJ!
Get our weekly newsletter from SEJ's Founder Loren Baker about the latest news in the industry!
  • Sushubh

    I have a question.

    I want to change the permalink structure in one of my blogs from:




    Is it possible to get it done in a search engine friendly way?

  • Loren Baker, Editor

    As long as the redirect plugin is working correctly, this should be no problem.

    If anything, the /archives/%year%/%monthnum%/%day%/ may be harming you as some engines, like Yahoo, give higher ranking to pages closer to the root directory.

    So, according to the newer URL structure, you’ll only be one or two steps from the root, in the old structure, you were 5 steps away.

  • Sushubh

    looks like it works only if the post id is in the URL. the /archives/%year%/%monthnum%/%day%/ structure lacks the post ID.

  • Hawaii Pictures

    Sweet! I just started this blog the other day and needed a refresher on the process. Thanks for sharing!

  • Cvos SEO

    Personally i only like to use /%postname%/ there is no reason to use /%post_id%/ if you don’t have to.

  • Ahmed Bilal

    I’d be interested in finding out how this impacts rankings and traffic.

  • Jaan Kanellis

    Just to be safe go and do a query (or look at Webmaster Console) and scan through the results so you can see if Google might be picking up on other duplicate pages. I have a issue with my poll plug-in on my sidebar that was causing enormous duplicate content issues. I have blocked the spiders from the URLs and ripped the poll down and currently looking for alternatives.

    The problem is Google was essentially thinking the poll URLs were the ones to show in the SERPs, blah.

    You can read more about it here:

    Duplicate Content Issues, Any Help?

  • Cvos SEO

    Jann – it sounds like you did the right thing using robots.txt to block the extra URL’s generated by your poll. In a month or so you should see the supplemental results decrease.

  • Andy Beard

    Glad to see you have made an update.

    There are plugins to optimize post slugs automatically if you don’t want to do it manually

    The URL structure has nothing to do with how content is organised in archives, there are other ways to manipulate your content such that even your oldest content is ranked as well as your most current.

  • Sreejith

    Well, I’ve been using “/?p=” for the last 6 months. I surely want to change over to the “/postname/post_id/” format.

    But, I’m afraid if I would lose a lot of visitors since my article was changed to another URL. Is there someway to go through this process without losing any blog readers or having marked as duplicate content ?

  • Albert Philip

    Hi, i have read your post and try the step according to your post. However, it seems that my old permalink won’t redirect to my new URL.
    My old url used: /%year%/%monthnum%/%day%/%postname%/

    and i change it to /%postname%/%postid%/

    However, i have submitted some article to some forum or website and my old permalink won’t redirect to the new permalink. Any suggestion or should i change it back? Because google has indexed my old permalink page.

  • Ken

    Your posts after making this change have not been available from the My Yahoo rss feed. It appears that this change has broken that feed.

  • jassica

    i have a problem in blogs there is so many poups and extra openning urls so can any one please guide me.
    Is it possible to get it done in a search engine friendly way?

  • Matthew Simiana

    Many thx! This mod worked really smoothly :).

  • Drew

    I am curious, as Cvos said, why bother with the post_id? If someone could tell us the pros/cons, it would be much appreciated.

  • Transcriber


    Inspired very much by this plugin, I changed my links SEO friendly to /%postname%/ .

    The link structure advised even by Matt Cutts is and mine has become exactly like that, thanks Loren and Bilal

    I am on Yahoo hosting. As said by Ken above, the damage was that, it broke all RSS links and my RSS feed content now is a big blank.

    Could you please do a tweak as I would like to retain the link structure as well retain RSS feeds? Contact me anytime for cooperation.

  • article directory

    good info , thanks.

  • dslblogger


    The answer to “why bother with the post_id?” is that if you leave the post_id out of your permalink-url you can possibly end up with 1 identical urls for 2 diffenrent posts – given these posts have the same title.

    So it’s saver to include the post_id in your permalink-url.

  • J rolex

    how do i install the plug ins?

  • xteb

    Hi, thanks for this tips.. how about the url structure I am using right now? Please give some advice if I should change it. I use /%category%/%postname%.html

    It forms a url like this:

    Hope to hear back from you 🙂

  • Oregon Publishing

    I have looking at other people’s blogs and wondered, “How’d they do that?” Thanks for the well written and illustrated post. I have updated my blogs to use the method and plugins you provided.

  • Oregon Publishing

    @ xteb looks like you have a good url structure to me. If I was searching for “wordpress seo strategies” and saw your Heading URL shown as posted I would click on that. does the .html make that much of a difference?

  • Christopher Price

    The .html used to make a huge difference, but now it only makes a minor one.

    WordPress 2.3 added canonical URL support, ensuring there aren’t any URL splits (where some backlinks have a trailing / and some don’t).

    If you have already changed your permalink, and are running WordPress 2.3, don’t bother… it really, really isn’t worth it. If you are just now tweaking your permalink, go ahead and add the .html for good measure.

  • SEO Videos

    Nice post there, I think that the latest version of wp already takes care of all this.

  • smith

    Thank a lot for good info, Loren Baker

  • SEO Web Design

    It is always good to change dynamic urls to static ones. I can feel your worries but if things are done right, the old url will be directed to the new one without any duplication issue.

  • Jack

    I did what was instructed and got a message that I should update my htaccess file. Also, when I try to go to the pages I get page not found. Any advice?

  • PrivateLabelProducts

    Hi there, and thanks for a great post.
    I do get a problem when I do this to my blog.
    If you want to look at it, its

    What ever option I use of the permalinks, it will not load any pages. But if I use the standard, it shows all pages.

    When I switch it even gives the old filename for the about page. I edited the about page to Articles. When I have the std setup, it goes to the articles. But when I add the new permalink structure, it goes to about. That dont exist. And the same with all the other pages I have created.

    Can anyone tell me what to do here?


  • Clickfire

    Okay, just tried this method on a WordPress site and it seems to work fine. The only thing that makes me nervous is having the redirects dependent on one little plugin. Thanks for sharing this, Loren.

    SEO Videos, I am using the 2.3.2 version of WordPress and it didn’t take care of it without the plugin.

  • Rafi

    Thanks for sharing. I get 404 File Not Found Error When I tried the same thing with a different site. Any comments?

  • Online Marketing Company

    Does anyone know of a similar plug-in that would work with a Windows / IIS WP installation?

  • BataDase

    There is a ISAP rewrite for IIS Windows, but WP will not support it. I would suggest you to get a Linux box for WP Hosting

  • BataDase

    Check this out

  • Sheridan

    Hi Loren,
    I wrote 400 posts in wordpress before realising the benefit of seo friendly urls. I now want to use them from this point on.
    But as I still get many google hits from the old 400 posts, I don’t want to lose them. How can I get round this problem?
    Thank you

  • Philip Franckel, Esq.

    I have several blogs, one of which has been #1 in the search results for years, and I have wanted to do this for a long time.

    I don’t know which version of WordPress existed when you wrote this article and SEO Videos wrote “Nice post there, I think that the latest version of wp already takes care of all this.”

    Does version 2.5.1 do this and if not, are your instructions compatible with version 2.5.1?

  • Robin

    It’s not working, all old backlinks lead to 404. Or did i miss something?

  • JC

    The slug 301 capabilities don’t seem to work in wordpress 2.6 for permalink redirect. That potential of a plugin no longer accomplishing an instruction in newer versions makes me hesitant to modify the existing urls.

  • montsa007

    thanks mate, this is very helpful and i just made my blog SEO friendly :p

  • SEO

    Your blog is very informative. However, it is pretty hard task but your
    post and experienced serve and teach me how to handle and make it more
    simple and manageable.

    Thanks for the tips… Best regards.

  • lauren

    Actually, you should consider doing your URL’s like this :


    google likes to see site structure, and it helps give weight to the more important, top level pages. with all your posts looking like top level pages, its hard to determine a site structure.

    Note: if you get 404 or ‘page not found’ errors after making your changes, you need to update your .htaccess file.

    Note II: If you already have 400 pages, use a plugin to 301 (perm redirect) the the new URL’s.

  • Christopher Price

    Having a “structure” may help, depending on your SEO goals. Remember, the residual link juice will trickle down, but there are diminishing returns.

    Matt Cutt’s blog has very little structure. The majority of his site exists at /blog/ (which tops the root domain). All articles are simply /blog/%postname%.

    Of course, he did not attach an article ID, but again, that’s okay for his blog. The structure depends on your SEO goals.

  • rch

    very good article. Informative and useful.

  • Daniel Dumas :: Mr Night Man

    thanks for this info man i just upgraded my site’s permalink

  • shujayat

    hi It is always good to change dynamic urls to static ones. I can feel your worries but if things are done right, the old url will be directed to the new one without any duplication issue.

  • shujayat

  • leah

    I have the same question as Sheridan above, can you comment on what, if any, impact changing the url structure had on incoming traffic from old posts (assuming the redirect is done correctly)?

  • Jerry

    I have this permalink structure: /article/%postname%/. what do you think? I’m implementing yours now but what do you feel about that permalink structure?

  • Favorit Kladionica

    Very useful post. Many Thanks

  • Rana Corp

    Thanks for your helpful article, I am going to implement this in my blog.

  • Ghufron

    thank you, I have read the step above and I understand.

  • Wali

    This is fine post, I already used this structure, we can call it SE friendly urls.

  • Sid

    Great work worsk great saved my posts… rock on post….keep it up..

  • Paula

    I installed the plugin and then changed the permalink structure to /%postname%/%post_id%/ and now when you click o n one of the new blog posts with the new url structure it redirects you back to the homepage? How do I correct this as the permalink redirect plugin does not seem to be working.

  • idotkontji

    Thx for this usefull article.. Now, i can more explore my SEO…

  • hard candy

    Good article.
    Having keywords in url really helps SE rankings.

  • The Music Mag

    Thanks. I use category/postname.

    For me it looks the best, shouldnt have much negative effects on SEO and adds to a well structured site.

  • Article-O-Pedia

    Thanks for sharing this informative Article! It’s really very helpful!!


    Thanks for the article.
    I m using this /%year%/%monthnum%/%day%/%postname%/

    With above the url of category pages changed to .

    How can I make it

    thanks for help

  • Ken Pendergast

    I have been using “/%category%/%postname%” for my custom URLs in wordpress. I do not like seeing ugly numbers in my urls. cleaner the better but always organized.

  • ben יעוץ עסקי

    do you know if it works in hebrew? i gives me 404

  • Porter

    Thanks a lot for the detailed instructions, I was worried about changing it and almost did with the redirect plugin. Glad I cam across this or I would have had some duplicated articles, thanks agin.

  • JD (

    I have one wordpress blog with multiple authors (50+), so having a unique id number in the URL is crucial for me but I also wanted the benifit of SEO keywords in the URL and also retain some website siloing (aka category structure)

    I came up with this

    Notive the -postID rather than /postID
    This stops it looking like 4556 is a page under “seo friendly url structure”

    Instead I would get this

  • Stefanos

    Thank you this post. I installed the plug-in successfully and changed the permanlinks to /%postname%/ and everything works fine.

  • Ranbir

    Hey Loren, please answer this for me as i am a bit confused right now. The permalinks structure that you gave right now is /%postname%/%postid% as this is what you are using on this fantastic blog. And also it comes close to description to the guidelines given by google if you want it to be indexed by Google news. However i have just came across an article on permalinks which says,

    “For performance reasons, it is not a good idea to start your permalink structure with the category, tag, author, or postname fields. The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties).”

    So now i am feeling a little confused as to which url shall i use right now? Please throw some light on this as it would mean a lot to me. Thanks.

  • Rohit

    thanks for the tips, i am just planning to launch a new blog for my website and this would help me to get seo friendly urls for my new blog. thank a lot

  • gcreator

    I want my permalinks to have *html extension and i have try this but cant work:

    what can I do ?

  • Kishore Mylavarapu

    Great way.I have one doubt.Are we have to do any changes to .htacss file?

  • SEO Services

    Very good description step by step.
    Thanks for this.

  • SEO Services

    Very good description step by step.
    Thanks for this.


    Muchas gracias

  • Frank

    Thanks for this. I finally have SEO friendly urls for my site.

  • Nikhil Phirke

    I use post-id/post-name url structure and found it great to use from SEO point of view