ss_blog_claim=ad249198800d1f7ffa32ece7d4a2d95a
Loren Baker, Editor

SEO Friendly URL Structure for Wordpress Blogs

March 21st, 2007 by Loren Baker, Editor | 48 Comments

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 Performancing.com) 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 Wordpress.org/Using_Permalinks

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




Comments

48 responses so far ↓

  • Sushubh on Mar 21, 2007 at 5:56 pm

    I have a question.

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

    /archives/%year%/%monthnum%/%day%/%postname%/

    to

    /%post_id%/%postname%/

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

  • Loren Baker, Editor on Mar 21, 2007 at 5:59 pm

    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 on Mar 21, 2007 at 6:16 pm

    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 on Mar 21, 2007 at 6:19 pm

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

  • Cvos SEO on Mar 21, 2007 at 6:37 pm

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

  • Ahmed Bilal on Mar 21, 2007 at 9:47 pm

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

  • Jaan Kanellis on Mar 22, 2007 at 11:35 am

    Just to be safe go and do a site:searchenginejournal.com 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?
    http://www.webproworld.com/viewtopic.php?t=72549

  • Cvos SEO on Mar 22, 2007 at 4:43 pm

    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 on Mar 22, 2007 at 5:16 pm

    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 on Mar 26, 2007 at 9:41 am

    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 on Mar 26, 2007 at 8:56 pm

    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 on Mar 28, 2007 at 3:24 pm

    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 on Apr 4, 2007 at 11:50 pm

    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 on May 3, 2007 at 1:26 pm

    Many thx! This mod worked really smoothly :).

  • Drew on Aug 5, 2007 at 8:16 pm

    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 on Aug 9, 2007 at 9:47 pm

    Loren,

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

    The link structure advised even by Matt Cutts is http://example.com/blog/sample-post 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 on Aug 16, 2007 at 8:52 pm

    good info , thanks.

  • dslblogger on Aug 19, 2007 at 5:44 pm

    @Drew

    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 on Nov 24, 2007 at 12:16 pm

    how do i install the plug ins?

  • xteb on Nov 27, 2007 at 5:06 pm

    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: http://xteb.net/seotips/wordpress-seo-strategies.html

    Hope to hear back from you :)
    John

  • Oregon Publishing on Dec 4, 2007 at 5:57 pm

    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 on Dec 4, 2007 at 6:00 pm

    @ 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 on Dec 30, 2007 at 9:37 am

    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 on Jan 14, 2008 at 4:27 pm

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

  • smith on Jan 22, 2008 at 12:08 pm

    Thank a lot for good info, Loren Baker

  • SEO Web Design on Jan 27, 2008 at 9:56 pm

    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 on Feb 3, 2008 at 3:25 pm

    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 on Feb 3, 2008 at 10:01 pm

    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 http://www.planetscrap.com

    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?

    Leif-Harald

  • Clickfire on Mar 16, 2008 at 3:50 pm

    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 on Mar 22, 2008 at 12:23 pm

    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 on Apr 25, 2008 at 5:09 pm

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

  • BataDase on Apr 26, 2008 at 8:16 am

    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 on Apr 26, 2008 at 8:17 am

    Check this out
    http://codex.wordpress.org/User:ringmaster/IIS

  • Sheridan on May 5, 2008 at 4:01 pm

    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. on Jun 7, 2008 at 8:55 am

    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 on Jul 8, 2008 at 11:20 am

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

  • JC on Jul 21, 2008 at 8:25 pm

    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 on Jul 24, 2008 at 7:48 am

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

  • SEO on Aug 15, 2008 at 2:34 am

    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 on Sep 21, 2008 at 2:09 pm

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

    /%category%/%postname%/

    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 on Sep 22, 2008 at 2:57 am

    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 on Oct 13, 2008 at 9:48 am

    very good article. Informative and useful.

  • Daniel Dumas :: Mr Night Man on Oct 20, 2008 at 2:35 am

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

  • shujayat on Nov 3, 2008 at 1:54 am

    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 on Nov 3, 2008 at 1:54 am

    www.skoolsonline.com

  • leah on Nov 6, 2008 at 1:18 pm

    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 on Nov 10, 2008 at 8:56 am

    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 on Dec 11, 2008 at 1:40 pm

    Very useful post. Many Thanks

Leave a Comment