Mark on WordPress

WordPress 2.3: Canonical URLs

Posted in canonical, canonical urls, development, wordpress, wordpress 2.3 by Mark Jaquith on September 25th, 2007

Canonical URLs is one of the features that I worked on for WordPress 2.3 It’s sort of a geeky concept, but the end result has benefits that a non-geek can appreciate, so I’m going to break it down for you.

WordPress has traditionally been very lenient in the URLs that it will accept.

For instance, say your blog is hosted on http://www.example.com/blog/.

You can likely access the front page of your blog via these alternative URLs:

  • http://example.com/blog/
  • http://www.example.com/blog/index.php/
  • http://example.com/blog/index.php/
  • http://www.example.com/blog/?paged=1
  • http://example.com/blog/?paged=1
  • http://www.example.com/blog/page/1/
  • http://example.com/blog/page/1/

And those are just the “sane” ones. Try this one on for size:

  • http://www.example.com/index.php/////page/1///////?paged=1

That’s the front page. We have additional issues for other views. For example, consider if you are using “fancy” permalinks and have a post up at http://www.example.com/blog/2007/09/17/dont-tase-me-bro/ with a post ID of 17. The following alternative URLs will work:

  • http://www.example.com/blog/2007/09/17/dont-tase-me-bro
  • http://example.com/blog/2007/09/17/dont-tase-me-bro/
  • http://example.com/blog/2007/09/17/dont-tase-me-bro
  • http://www.example.com/blog/index.php/2007/09/17/dont-tase-me-bro/
  • http://www.example.com/blog/index.php/2007/09/17/dont-tase-me-bro
  • http://example.com/blog/index.php/2007/09/17/dont-tase-me-bro/
  • http://example.com/blog/index.php/2007/09/17/dont-tase-me-bro
  • http://www.example.com/blog/?p=17
  • http://example.com/blog/?p=17
  • http://www.example.com/blog/index.php?p=17
  • http://example.com/blog/index.php?p=17

The following issues comprise the majority of incorrect alternative WordPress URLs.

  • Old URL structure when using “fancy” permalinks
  • <www.example.com vs. example.com
  • “Fancy” permalinks with /index.php/ (called “PATH_INFO permalinks”) vs “fancy” permalinks without (”mod_rewrite permalinks”)
  • URLs with trailing slashes vs. URLs without trailing slashes
  • /page/1/ (always redundant)
  • ?paged=4 vs. /page/4/

So, what’s the problem with this? The URLs are all showing the exact same content, so why should it matter? Well, search engines can’t assume that all of these alternative URLs represent the same resource. So they don’t automatically get condensed into a single resource. As a result, you can actually end up competing against yourself in search engine rankings. So to avoid confusing search engines and to consolidate your rankings for your content, there should only be one URL for a resource. We call this URL the canonical URL. Canonical means “standard” or “authoritative.” It’s the one that WordPress generates, and it’s the one that you want everyone to use.

Since version 2.2, WordPress-generated rules have been very well standardized. I personally invested a lot of time making sure things like trailing slashes were consistently standardized. So that’s one piece of the puzzle — making sure that WordPress isn’t working against you by generating non-canonical URLs. But of course, you can’t control who links to you, and third parties can make errors when typing or copy-pasting your URLs. This canonical URL degeneration has a way of propogating. That is, Site A links to your site using a non-canonical URL. Then Site B see’s Site A’s link, and copy-pastes it into their blog. If you allow a non-canonical URL to stay in the address bar, people will use it. That usage is detrimental to your search engine ranking, and damages the web of links that makes up the Web. By redirecting to the canonical URL, we can help stop these errors from propagating, and at least generate 301 redirects for the errors that people may make when linking to your blog.

My goal for WordPress 2.3 was to cover the majority of canonical URL issues that people have and make WordPress automatically redirect those requests to the correct (canonical) URL for that resource. Early tries at this functionality had issues with being too aggressive. I rewrote the functionality multiple times, until I settled upon the current incarnation. I’m quite happy with it.

Ideally, you shouldn’t even be aware of the feature. You might have issues, however, if you have enabled your own form of canonical URL redirection that isn’t redirecting the the URLs that WordPress thinks are the canonical version. For instance, if your blog is http://www.example.com/blog/ but you have a line in your .htaccess that redirects people to http://example.com/blog/, you’re not going to be able to access your site, as the two redirects will “fight” each other in an infinite loop until the browser gives up. You’ll also have issues if your server is generating a non-standard $_SERVER['REQUEST_URI'] value. For this reason, the feature has been disabled for IIS. WordPress can set a correct $_SERVER['REQUEST_URI'] for some IIS incarnations, but fails on others. This is an issue that I hope we’re able to fix in the future. That said, the vast majority of WordPress blogs are not running on IIS, so you’ll likely be fine.

If you’re having issues with infinite redirects, please open a ticket. And in the meantime, you can use this one-line plugin to disable the feature.

202 Responses to 'WordPress 2.3: Canonical URLs'

Subscribe to comments with RSS or TrackBack to 'WordPress 2.3: Canonical URLs'.

  1. Daniel Jalkut said, on September 25th, 2007 at 1:27 am

    Cool stuff. Your work will be appreciated on my blog. As soon as I finish catching up on post-vacation news, and install 2.3 :)

  2. [...] Mejor tratamiento de las URLS, dependiendo de la configuración de los permalinks ahora WordPress revisará si la URL termina en / o incluso si está incompleta WordPress buscará el post que más se le parezca, si lo hay. Mark ha explicado mejor el tema de las URLs canónicas en WordPress 2.3 [...]

  3. WordPress › Blog » WordPress 2.3 said, on September 25th, 2007 at 9:44 am

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  4. [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  5. [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  6. [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  7. minus-one » Wordpress 2.3 said, on September 25th, 2007 at 11:35 am

    [...] url-оптимізація і “розумне” перенаправлення. [...]

  8. [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  9. [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  10. Michael said, on September 25th, 2007 at 1:19 pm

    if your blog is http://www.example.com/blog/ but you have a line in your .htaccess that redirects people to http://example.com/blog/, you’re not going to be able to access your site, as the two redirects will “fight” each other in an infinite loop until the browser gives up.

    This used to be the case in Beta, but not in 2.3 official release.

  11. Dexter for Wordpress 2.3 said, on September 25th, 2007 at 1:52 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  12. [...] quem é muito “geek” segundo os próprios desenvolvedores, pois eu nunca vou estudar a coisa toda a ponto de usar [...]

  13. mg said, on September 25th, 2007 at 2:39 pm

    Ah, finally, a way to force people to drop the ‘www.’ in the URL. For the sake of consistent cookie-ing, at the very least. Much ta :)

  14. [...] It enforce your no-www preference and it redirect posts with changed slugs the new post so say goodbye to "page not found error". And this makes your blog search engine friendly. [...]

  15. Mark Jaquith said, on September 25th, 2007 at 3:08 pm

    Trust me, Michael — you don’t want an .htaccess rule that counteracts WordPress redirects. Neither rule is aware of the other, and they will bounce the user back and forth between them until the browser gives up.

  16. soverato said, on September 25th, 2007 at 3:48 pm

    Great work, “one small step for seo, one giant leap for wpkind” :-)
    thanks

  17. Wordpress 2.3 has been released - DigitalORDER said, on September 25th, 2007 at 3:50 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  18. Irving said, on September 25th, 2007 at 4:08 pm

    Fascinating stuff :) Geeks make the world a better place :)

  19. links for 2007-09-25 < Logg for Aslak Raanes said, on September 25th, 2007 at 5:19 pm

    [...] WordPress 2.3: Canonical URLs « Mark on WordPress «Ideally, you shouldn’t even be aware of the feature. You might have issues, however, if you have enabled your own form of canonical URL redirection that isn’t redirecting the the URLs that WordPress thinks are the canonical version.» (tags: wordpress blog canonical canonical.php 2.3) [...]

  20. SecondVersion.com - WordPress 2.3 is here! said, on September 25th, 2007 at 6:08 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  21. Bloggishi » 800% faster: Wordpress 2.3 said, on September 25th, 2007 at 6:16 pm

    [...] optimization, as search engines like for each page to be available in one canonical location. More info here. 4. Their new pending review feature will be great for multi-author blogs. It allows authors to [...]

  22. [...] WordPress was released last night. New features include support for tagging, update notification, Canonical URLs, pending review for multi-author blogs and a new advanced WYSIWYG. Here’s more information on [...]

  23. WordPress 2.3 is released! | Perfect Blogger said, on September 25th, 2007 at 6:21 pm

    [...] Canonical URLs - will allow you to change slugs of any post and have WordPress automatically redirect old slug URL to the new URL of your post. Brilliant idea, great for SEO! Mark Jaquith has a great post explaining how it all works: Canonical URLs in WordPress 2.3 [...]

  24. Wordpress 2.3 is out ! | The Voyager said, on September 25th, 2007 at 7:08 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  25. Chuck said, on September 25th, 2007 at 7:32 pm

    nice…..

  26. [...] version 2.2.3 but it’s finally on. The problems I had were caused by one of the new features: canonical URLs. Basically, what it does is to make sure that no matter how you access certain content you’ll [...]

  27. Wordpress 2.3 Dexter Released | BlogOnExpo said, on September 25th, 2007 at 8:33 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  28. [...] WordPress 2.3 gained a Canonical Url feature. This doesn’t affect the method I used to change the Page Permalinks, but it does redirect [...]

  29. Alan J Castonguay said, on September 25th, 2007 at 10:16 pm

    I’m rewriting my Page permalinks using the ‘page_link’ filter, so they appear on a different domain.

    If is_page(), filtering ‘option_home’ lets me change the Page permalinks your code generates, so they match the ones I craft via ‘page_link’, thus enforcing my desired canonically.

    Nice stuff Mark!

  30. Tarek said, on September 25th, 2007 at 11:25 pm

    Amazing change in the way urls are handled!
    way to go WP

  31. Jermayn Parker said, on September 26th, 2007 at 12:19 am

    Ok, I think I may be in trouble…

    My website is http://germworks.net/blog/ (were the blog is located) however I have a www direct plugin which directs people to http://germworks.net incase they type in the http://www. Is this ok???

  32. [...] one of the lead developers, explained it in detail on his blog in a post titled simply enough, WordPress 2.3: Canonical URLs. I do like this, since it can only help me in the search engine wars. And since I can deactivate a [...]

  33. [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  34. Wordpress 2.3 Released » Sandossu said, on September 26th, 2007 at 3:44 am

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  35. Rxbbx Blog WordPress 2.3 said, on September 26th, 2007 at 3:46 am

    [...] Management - Pending Review - Advanced Visual Editor Buttons - Pretty URLs, WWW / no-WWW see also WordPress 2.3: Canonical URLs - Cleaning up of bad URLs - Updated Default Blogroll - Full and complete Atom 1.0 support, [...]

  36. Wordpress 2.3 is out! | Free Cash Quest said, on September 26th, 2007 at 3:58 am

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  37. [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  38. [...] 3. Conical URLs. That means that you can choose to enforce non-www or www preferences, redirect changed slug posts (bye 404). This is a excellent feature, it will improve blogs SEO rankings by a bundle. You can read more about conical URLs here. [...]

  39. AM Putra said, on September 26th, 2007 at 7:14 am

    http://www.example.com/blog/index.php/2007/09/17/dont-tase-me-bro/
    Wow, it seems like an Expression Engine URL’s style to me. Quite tricky, but I appreciatively it great.

  40. My Family Loves It » Cross your fingers... said, on September 26th, 2007 at 9:50 am

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  41. [...] Canonical URLs ทำให้รองรับรูปแบบของ URL ที่ยืดหยุ่นมากขึ้น (อ่านรายละเอียดเพิ่มเติม) [...]

  42. [...] Canonical URLs Great New Features in WordPress 2.3 10 Things You Need to Know About WordPress [...]

  43. [...] Canonical URLs in WordPress 2.3 [...]

  44. edtajchman said, on September 26th, 2007 at 4:45 pm

    I’ve never truly understood the difference between using the http://www. and not using it,.. some places it doesn’t matter some places it does,… you are trying to break it down , thank you, it still sounds like technospeak,…lol

  45. Michael said, on September 26th, 2007 at 5:17 pm

    Trust me, Michael — you don’t want an .htaccess rule that counteracts WordPress redirects. Neither rule is aware of the other, and they will bounce the user back and forth between them until the browser gives up.

    Mark, I just found out why wordpress didn’t bounce me back and forth even if I have rewrite rules to remove www prefix from my domain. I put the codes in server config instead of .htaccess. I guess that’s the reason.

  46. [...] ADDING: Beware of WordPress 2.3’s new Canonical URL feature. It’s a great feature, long overdue, but if you have redirects in .htaccess, you can possibly create a redirect loop. Lots of info on this feature can be found at Mark on WordPress. [...]

  47. WordPress Wednesday - “Dexter” | BlissLogs said, on September 26th, 2007 at 9:51 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  48. [...] WordPress 2.3: Canonical URLs « Mark on WordPress ahhh, so this is what Canonical URLs mean… [...]

  49. Version 2.3 “Dexter” of WordPress | MIX J said, on September 26th, 2007 at 11:41 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  50. The Release of Dexter (WP2.3) : WP Thoughts said, on September 27th, 2007 at 7:35 am

    [...] URI’s are issues of the past now that WP 2.3 has been released, Mark Jaquith has presented an article about WP URI’s that could access your site, and WP 2.3 has eliminated them. Hopefully all [...]

  51. [...] It freaks me out how fast memes propogate through the internets. When learning about the new features in WordPress 2.3 I stumbled upon an entirely unexpected DTMB reference here. [...]

  52. [...] WordPress 2.3: Canonical URLs « Mark on WordPress : My goal for WordPress 2.3 was to cover the majority of canonical URL issues that people have and make WordPress automatically redirect those requests to the correct (canonical) URL for that resource. Early tries at this functionality had issues with being too aggressive. I rewrote the functionality multiple times, until I settled upon the current incarnation. I’m quite happy with it. [...]

  53. [...] To find out more about Canonical URLs i suggest a reading of Mark’s Blog. [...]

  54. Infovore » links for 2007-09-27 said, on September 27th, 2007 at 7:55 pm

    [...] WordPress 2.3: Canonical URLs « Mark on WordPress A detailed explanation of the WordPress 2.3 implementation of resolving to a single canonical URL. (tags: wordpress seo url blogging) [...]

  55. Wordpress 2.3 released - Bullroarer said, on September 27th, 2007 at 9:47 pm

    [...] WordPress has finally helped out with search engine optimization by including a feature called canonical URLs which allows users to enforce preferences such as no www URLs.  This feature will also allow [...]

  56. caerma's blog » WordPress 2.3 said, on September 27th, 2007 at 10:29 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  57. Jack said, on September 28th, 2007 at 3:28 am

    oh Mark.
    how i thank you for this. thank you!

  58. [...] man nun mit der neuesten WP-Version abzustellen. Mark Jaquith erklärt als Mitentwickler, was es damit auf sich hat und wie man es umgestellt hat. Er muss es wissen, hat er die Prozedur doch selbst [...]

  59. Sam said, on September 28th, 2007 at 8:05 am

    Does this make the enforce-www-preference plugin redundant?

  60. Martin Hiegl said, on September 28th, 2007 at 8:45 am

    What’s with two different WP-Installation under the same domain? I had the problem where a new 2.3 installation (23.domain.tld) “overwrote” an old 2.2 installation (domain.tld).

  61. resist said, on September 28th, 2007 at 9:12 am

    not bad at all…will experiment with it

  62. [...] pm by propaganda press in WordPress Canonical URLs is one of the features that I worked on for WordPress 2.3 It’s sort of a geeky concept, but the [...]

  63. [...] ausführlicher wird das Problem von Mark im WordPress-Blog erklärt. Er muss es wissen, denn dieses Modul in WordPress stammt von ihm. Hat Dir der [...]

  64. [...] here, where many had linked to it, to over here, where people have also linked to it. Can you say canonical links? I’ll hopefully be able to upgrade to WordPress 2.3 in due course. For now, if you are a [...]

  65. grzzap said, on September 28th, 2007 at 1:26 pm

    Nice Site!

  66. [...] to Mark Jaquith, an official contributing developer to the WordPress project: My goal for WordPress 2.3 was to [...]

  67. [...] man sich dagegen wehren kann, weis der Nachtwächter. Weitere Probleme habe ich mit den neuen Canonical URL Redirects die hinter einem Loadbalancer zu endlos-Redirects führten. Mit dem offiziellem Plugin zum [...]

  68. [...] Canonical URLs - They have cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  69. [...] Ser vi på det rent SEO-mæssigt, er der også sket ændringer hvad angår url-håndteringen. Der sørges nu for at urls med og uden www lander samme sted (har tidligere kunnet opnåes med plugin’et no-www.), så man undgår duplicate content ved at have to url-adresser der peger på samme indhold. Læs mere på siden for faciliteten “kanoniske urls“. [...]

  70. [...] If you want to know more about what is Canonical Urls, especially on wordpress. there is no where else better then on Mark page it self. go read it here. [...]

  71. damnprinter said, on September 29th, 2007 at 7:47 am

    My current host interfere’s with my permalinks, will 2.3 help with that?

    I have http://example.com/index.php/117/postname.html as the permalinks and they get a 404 unless you visit the hompage first. They won’t say what they are doing that is blocking them only that permalinks won’t work right on their server.

  72. damnprinter said, on September 29th, 2007 at 8:34 am

    Well I found out that wordpress 2.3 won’t fox permalinks on a webhost that interferes with them.

  73. copperleaf said, on September 29th, 2007 at 11:23 am

    Cool! I was actually looking at adding something to my .htaccess when 2.3 was released because of issues with AJAX and having the leading www (vs not having). Works great!

  74. imagiscape said, on September 30th, 2007 at 12:42 pm

    Thank you.

  75. Daniel said, on September 30th, 2007 at 1:25 pm

    Oh man, you really helped me out! I was frustatedly sitting in front of my computer wondering why things doesn’t work as usual after I upgraded to version 2.3.

    Thank you very much, very useful plugin!

    Greetings from Germany

  76. Dj Aldo said, on September 30th, 2007 at 2:44 pm

  77. Mark Kenny said, on September 30th, 2007 at 5:42 pm

    I love you, this is just lovely. I mean it’s just pure loveliness. It’s this kind of polish that make all the alternatives to WordPress pale into miserable insignificance.

  78. Deacon’s Blog » WordPress update said, on September 30th, 2007 at 11:38 pm

    [...] Jaquith of Mark on WordPress discusses WordPress 2.3 Canonical URLs and the problems they may [...]

  79. Mark Jaquith said, on October 1st, 2007 at 1:40 pm

    Does this make the enforce-www-preference plugin redundant?

    Yes. It incorporates that functionality.

  80. Wayne said, on October 1st, 2007 at 4:01 pm

    Thanks for the plugin. Fixes a problem with Yahoo hosted sites.

    More details here: http://wordpress.org/support/topic/135725?replies=5

  81. [...] from the tidying up of URLs used to access posts, Canonical URLs. The author of these changes Mark Jaquith blogs the background to these changes and makes a good case for them. The first problem is that http://www.motiveauto.com/page/1 is no longer a [...]

  82. Colin Helvensteijn said, on October 2nd, 2007 at 4:34 am

    Awesome stuff this. Thanks!

  83. Wordpress v 2.3 | Udeen DotCom said, on October 2nd, 2007 at 12:07 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  84. [...] Canonical URLs are also supported in WordPress 2.3 - a significant improvement. [...]

  85. Rehan Asif said, on October 3rd, 2007 at 2:46 pm

    These built in redirects…are they supposed to be 302 redirects?
    And if so, is there anyway to change them to be 301 redirects?

  86. [...] There is now the update to WordPress 2.3 avaiable. For me the most interesting new things are canonical URLs, update notification of new releases of WordPress or of plugins that are used and native tagging [...]

  87. New Underpinnings said, on October 4th, 2007 at 11:31 am

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  88. [...] I’ve been playing around with Habari, and so far I’ve tested the install on three different machines. One of Habari’s requirements is Apache’s mod_rewrite, which allows URLs from a client to be rewritten on the server. This means that a browser can request a pretty URL, such as http://www.example.com/habari/really-interesting-post and it will be redirected on the server to a script that returns the post with the slug really-interesting-post. Mark Jaquith has written a good article about this in relation to WordPress. [...]

  89. Roger said, on October 4th, 2007 at 10:44 pm

    I’m not sure if this is the cause of my problem. I had set up a subdomain earthcomm.mysciencespace.com and pointed it to mysciencespace.com/wordpress As soon as I up graded to 2.3 the subdomain redirected to the root domain instead of the wordpress directory.

    What can I do to fix this?

  90. Aggiornamento al WordPress 2.3 said, on October 5th, 2007 at 2:58 am

    [...] URL Canoniche sono supportate in questa [...]

  91. Puthzel.com said, on October 5th, 2007 at 5:48 am

    Thank you very much for sharing…
    This is nice article for sharing to other netter…

    http://www.puthzel.com
    Thanks…

  92. [...] mit http://www.irgend.wo, so wird ein Aufruf von irgend.wo automatisch auf http://www.irgend.wo umgeleitet. Unter WordPress 2.3: Canonical URLs werden Details und weitere Features [...]

  93. WordPress | 日本 » WordPress 2.3 said, on October 7th, 2007 at 2:52 am

    [...] 「標準URL(カノニカルURL)」と名付けたシステムにて、URLまわりをすっきりさせました。これにより、WWW がドメイン名の頭につかないよう強制的に変更したり、記事スラッグが変更された記事の古いURLをリダイレクトしてリンク切れをなくすようにしたり、メール内の途中で途切れたURLを、似たURLへリダイレクトしたりするなどの機能が追加されました。これらの機能は、ユーザーが迷ってしまうことを防ぐだけでけではなく、各記事に「標準URL」を割り当てることにより、検索エンジン最適化にも役立ちます。さらに詳しい情報は、こちらにて。 [...]

  94. Wakefield said, on October 7th, 2007 at 7:36 am

    Wow, this is purely awesome, great work. This is something that should be more prominently featured and announced by WordPress, as it may dramatically mess with people who had modded .htaccess and were getting infinite loops, being forced to use default to old url structure and losing incoming links in the process.

  95. [...] – Preparing for 2.3 WordPress 2.3 WordPress 2.3: Canonical URLs Upgrading to WordPress 2.3 Dexter Enhancing WordPress [...]

  96. cyclepromo said, on October 9th, 2007 at 12:54 am

    Mark or someone, should I delete this in my .htaccess file before I upgrade.

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example\.org$ [NC]
    RewriteRule ^(.*)$ http://www.example.org/1 [R=301,L]

    Let me know.

  97. WordPress 2.3 said, on October 10th, 2007 at 1:55 am

    [...] We鈥檝e cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  98. [...] you’ve installed Mark’s plugin to disable canonical urls, deactivate it. This has been rolled into my plugin as [...]

  99. mortgagevladim said, on October 11th, 2007 at 11:22 pm

    Hi everybody
    I’ve found it site accidentally
    The site has an interesting title
    I’ve been interested in discussing themes
    I want to open a new theme
    It will be interesting
    Good luck
    mortgage

  100. [...] Enforce http://www. Preference I dropped the www NOTE: This plugin is now redundant with 2.3. [...]

  101. [...] Visit [...]

  102. Alderete said, on October 16th, 2007 at 11:49 pm

    In earlier versions of WordPress, I used the Permalink Redirect plug-in (http://fucoder.com/code/permalink-redirect/). While the new WordPress feature makes this plug-in mostly obsolete, there’s one feature of Permalink Redirect that doesn’t seem to have made it to 2.3.

    Specifically, you could enter your Old Permalink Structure, and have Permalink Redirect handle the situation where you had changed your permalink structure, i.e., pretty URLs from both the _old_ and the _new_ permalink structures would work.

    (Yes, I know. “Don’t do that. ;-)” But I needed to change the structure. Now I need to make sure the old links still work.)

    More pressingly (for me), this feature of Permalink Redirect no longer works, probably because the way permalinks are built/handled has changed. Is there a new WordPress 2.3-friendly way to preserve an old permalink structure?

  103. Gormful » Life After said, on October 17th, 2007 at 1:36 pm

    [...] a little bit of SEO. WordPress 2.3 is actually more SEO-friendly as it has a more robust system in canonicalizing URLs. The core code definitely has a lot to offer and being released in GPL is certainly deserving of a [...]

  104. jeremyclarke said, on October 17th, 2007 at 8:12 pm

    Hey Mark,

    This is no doubt a great idea, but it kills the ability to make complex queries that skip permalinks. So while I usually want my category url to look like:

    site.com/~/general/

    I use a plugin to generate archive urls like:

    site.com/?cat=2&m=200710

    When I go to the second url it forwards me to the first and doesn’t filter it at all for dates.

    If I give the normal pretty url for a category and append the m=200710 to it just forgets the category entirely and takes me to the month page.

    I imagine similar problems with other variables passed in queries.

    Is there a way to avoid this breaking while still using permalinks for normal pages?

    It seems like you’d need either to add in exceptions for times when there are multiple variables being passed in the non-pretty method, or else make sure that all sane combinations of variables can be passed using complex pretty-urls like

    site.com/~/general/2007/10

    That one of course doesn’t work. Do you know a method to get categories and dates to coexist in a pretty url? Otherwise do you think that one or the other of my solutions is viable? We’ll have to turn off the filter for now, but i’d be happy to keep the other features without breaking multiple url variables.

  105. Relax said, on October 20th, 2007 at 4:17 pm

    I was useful very much.
    Thank you

  106. [...] В админке во вкладке Options - General проверяю Blog address (URL). Я придерживаюсь философии no-www, поэтому проверяю, чтобы в данном поле был введен адрес без http://www. Если речь идет о простом сайте или скрипте WordPress ниже версии 2.3, то я вручную в .htaccess прописываю 301-й редирект на адрес без http://www. С версии 2.3 WordPress отлично канонизирует все адреса. [...]

  107. Paul Rohde » Wordpress Update Complete! said, on October 22nd, 2007 at 5:10 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  108. [...] Canonical URLs [...]

  109. 301 редирект said, on October 24th, 2007 at 8:47 am

    use mod_rewrite, 301 redirect

  110. [...] WordPress 2.3: Canonical URLs [...]

  111. OSC DEMO » Blog Archive » Test POST said, on October 24th, 2007 at 4:29 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  112. Web Entrepreneur - Make Money Online said, on October 27th, 2007 at 9:55 am

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  113. ForumViaggiare said, on October 28th, 2007 at 3:51 am

    good work

  114. [...] problem is due to the canonical redirection functionality, it redirects incorrect permalinks to their correct [...]

  115. María Ángeles Durán » Post de prueba said, on October 29th, 2007 at 1:46 pm

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  116. WordPress 2.3 | Joseph Scott's Blog said, on October 30th, 2007 at 6:28 pm

    [...] along with update notifications for WordPress and plugins. Mark Jaquith has a great write up on his canonical URLs [...]

  117. [...] back into the URLs since most of my 404s are trying to get those pages. Weird since I thought canonical URLs were supposed to automatically redirect that stuff. Oh [...]

  118. Mahesh Mohan said, on October 31st, 2007 at 6:15 pm

    I have just upgraded to wordpress 2.3.1.

  119. Gary Brooks said, on November 7th, 2007 at 10:37 pm

    We have our site setup http://www.capitaplus.com using a old version of wordpress version 2.o and im afraid of updating because I might mess up the URL stucture. Can you please advice what I should do so i dont loose my search engine rankings? We buy invoices and our current rankings are very important.

    Thanks

  120. Stephen said, on November 9th, 2007 at 3:44 pm

    Unfortunately I am one of those few WordPress people running WordPress on IIS (I’m using IIS 6).

    I guess this excellent feature is not enabled for me. In which case I’m using the www-redirect plugin (located here: http://www.justinshattuck.com/wordpress-www-redirect-plugin/). Its probably not as robust and all encompassing as what you describe, but it’ll fix some of the basic ones which are most often the issue.

    I know IIS is not the popular choice but I have to use it for business reasons. And i’ve learned quite a few tricks in how to get WordPress working for IIS 6 users.

    If anyone needs help you can email me. You’ll find my email under the “About Ponder Place” section of my site (which is running off IIS6) http://www.ponderplace.com

  121. WordPress 2.3 | The Dragons Den Gaming Site said, on November 10th, 2007 at 4:22 am

    [...] We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  122. portorikan said, on November 12th, 2007 at 2:29 pm

    thank you SOOO SOOO MUCH. You need a donate now button or something.

    Thanks again. By the way, your name looks familiar. You’re an ARS guy, right?

  123. portorikan said, on November 12th, 2007 at 2:30 pm

    I want to say thank you again. I almost want to cry. :)

  124. [...] call it like that) can be fixed by disabling the canonical.php in your wp-includes forlder. Go to this page to check for Mark’s [...]

  125. [...] The blog software WordPress is just released in version 2.3. One of the new additions are a feature that can rescue and correct links when users accidentally follow a link in an email broken over 2 lines. Or following an old link that the blog author has renamed. We’ve cleaned up URLs a bunch in a feature we call canonical URLs which does things like enforce your no-www preference, redirect posts with changed slugs so a link never goes bad, redirect URLs that get cut off in emails on similar to the correct post, and much more. This helps your users, and it also helps your search engine optimization, as search engines like for each page to be available in one canonical location. More info here. [...]

  126. Ruben said, on November 19th, 2007 at 2:44 am

    Thank you sir, you just saved me a very painful rollback.

  127. [...] if you are having any issues with it, the plugin can be found at the bottom of this post on the new canonical redirection. We have submitted a bug to the WordPress trac system, and will be disabling this redirection until [...]

  128. Stephen Joseph said, on November 29th, 2007 at 4:41 am

    This feature caused me to spend the last three of four hours trying to complete my upgrade to 2.3. I couldn’t get any of my permalinks to work and I couldn’t figure out why, so my whole website was unaccessible unless I changed the style of permalinks I use, thus ruining my traffic from anyone linking in. I almost gave up trying to pursue blogging as a career because this was to difficult for me to figure out. I’m glad there was that disable plugin. I just wish I had it with the upgrade so that I could have saved all the deleting and data loss that ensued. Yeesh. I can appreciate optimization. But when there’s a teeny 0.001% bug, please leave the disable fix in the download with the upgrade or something.

  129. Alex (Indigo Clothing) said, on December 2nd, 2007 at 7:18 am

    This is a great feature for WP - thanks so much for working on it.

  130. RebelSoft » WordPress 2.3.1 said, on December 2nd, 2007 at 7:25 pm

    [...] con il ramo 2.3 di WordPress è stato inserito il supporto nativo al tagging, è stato sistemato il “problemino” degli URL (per il quale usavo il plugin Permalink Redirect), c’è un sistema di notifica per gli [...]

  131. Manish Chauhan said, on December 5th, 2007 at 1:06 am

    Great stuff dude… :)

  132. Manish Chauhan said, on December 5th, 2007 at 1:08 am

    Its really nice n informative article with a basic understanding of Canonical Optimization.Thanks buddy.. :)

  133. Manish Chauhan said, on December 5th, 2007 at 1:09 am

    Mind blowing article………. :)

  134. Manish Chauhan said, on December 5th, 2007 at 1:19 am

    jagksgchjkxZ B BJZBHZKXBZK

  135. Julio said, on December 6th, 2007 at 2:53 am

    This plugin fixes the problem of the redirects, but it screws up my feedburner settings.

  136. [...] plug-in does not work with wp 2.3.x because of the way the 2.3.x series handles canonical urls. mark has a plug-in that disables this method of handling [...]

  137. [...] Redirect (http://fucoder.com/code/permalink-redirect/) 0.8.1 (No longer necessary; built into core [...]

  138. [...] WP discussion starts at 0:48. For an in-depth look at the canonical URL feature, check out my writeup of the feature. [...]

  139. Julio said, on December 7th, 2007 at 9:35 pm

    My host is Yahoo. Does this have to do with the all the problems I am having? I am using the Customizable Permalinks plugin from Yahoo, but when I activate it I cant get to the page the articles. I downloaded the “Disable Canonical URL Redirection” plugin and that fixes the problem. Activating that pluin creates other problems. Like messing up my connection to Feedburner. How can I fix this problem?

  140. djsito said, on December 9th, 2007 at 11:23 am

    if you need any thing like software,videos,music,lessons(any sort of lessons,formations)help for computer,any thing we can help you with it , so visit this website and tell us what you need we will find what you looking for thank you this is the link Clic here

  141. [...] Kanonické URL, o kterých existuje jeden odborný článek, takže se tím nebudu dále [...]

  142. g1smd said, on December 10th, 2007 at 11:30 am

    Finally, someone takes this issue seriously!!

    Hurrah!!

    I have been writing about these bugs for about 4 or 5 years. Until now, every forum, blog, cart and CMS system has suffered from these issues.

    It is nice to see it addressed and (as far as initial reports go) mainly fixed. I’ll be running some tests and I’ll file a bug report if I find any major holes still lurking.

  143. [...] urls. a trouble ticket has been submitted to yahoo! by a wp user and y! employee and  mark has a post about it and a plug-in to disable the wp 2.3.x [...]

  144. [...] wrote a one-line plugin that works around the problem in a not-ideal solution, but it works. Here’s why the problem exists. I’m realizing that in order to maintain an effective blog, I will [...]

  145. Peter said, on December 12th, 2007 at 6:22 pm

    I don’t consider this a “feature”… we’ve been receiving complaints from our web hosting customers for the last two weeks and we have spent countless hours trying to figure out why many blogs stopped working.

    It was all due to this… such altering features are not supposed to be enabled by default. There has to be a transition period with plenty of warnings for about a year or two, then enable it by default.

    Sort of the same way as when the PHP team decided to turn register_globals off…

  146. Julio said, on December 14th, 2007 at 6:15 pm

    Mark,

    Your plugin fixes the issue of redirects, but kills my feed to feedburner and my BuzzBoost stops working. How can I fix this?

    Thanks!

  147. WordPress’ fantastiske redirects · Fru W. said, on December 21st, 2007 at 6:16 am

    [...] redirects Nå som jeg har flyttet siden og gjort om endel så kommer WordPress sin “Canonical URLs” funksjon til sin fulle [...]

  148. nowe samochody said, on December 26th, 2007 at 9:36 am

    It is very nice to see that someone takes this issue seriously!!

  149. Kevin Cooke said, on December 26th, 2007 at 9:33 pm

    I can’t open a trac ticket without admin privileges, but we’re having this exact issue — infinite recursion in redirects. I tried adding a functions.php file with the code for the plugin, which works on our development server but not in production.

    How do I get privs to open a trac ticket?

    And I sort of agree with the above poster who said that such changes in upgrade should be better advertised, or at least opt-in for the first revision.