WordPress 2.3: Canonical URLs
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.
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
[...] 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 [...]
[...] 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. [...]
[...] 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. [...]
[...] 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. [...]
[...] 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. [...]
[...] url-оптимізація і “розумне” перенаправлення. [...]
[...] 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. [...]
[...] 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. [...]
This used to be the case in Beta, but not in 2.3 official release.
[...] 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. [...]
[...] quem é muito “geek” segundo os próprios desenvolvedores, pois eu nunca vou estudar a coisa toda a ponto de usar [...]
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
[...] 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. [...]
Trust me, Michael — you don’t want an
.htaccessrule 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.Great work, “one small step for seo, one giant leap for wpkind”
thanks
[...] 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. [...]
Fascinating stuff
Geeks make the world a better place 
[...] 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) [...]
[...] 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. [...]
[...] 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 [...]
[...] 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 [...]
[...] 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 [...]
[...] 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. [...]
nice…..
[...] 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 [...]
[...] 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. [...]
[...] 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 [...]
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!
Amazing change in the way urls are handled!
way to go WP
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???
[...] 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 [...]
[...] 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. [...]
[...] 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. [...]
[...] 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, [...]
[...] 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. [...]
[...] 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. [...]
[...] 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. [...]
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.
[...] 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. [...]
[...] Canonical URLs ทำให้รองรับรูปแบบของ URL ที่ยืดหยุ่นมากขึ้น (อ่านรายละเอียดเพิ่มเติม) [...]
[...] Canonical URLs Great New Features in WordPress 2.3 10 Things You Need to Know About WordPress [...]
[...] Canonical URLs in WordPress 2.3 [...]
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
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.
[...] 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. [...]
[...] 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. [...]
[...] WordPress 2.3: Canonical URLs « Mark on WordPress ahhh, so this is what Canonical URLs mean… [...]
[...] 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. [...]
[...] 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 [...]
[...] 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. [...]
[...] 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. [...]
[...] To find out more about Canonical URLs i suggest a reading of Mark’s Blog. [...]
[...] 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) [...]
[...] 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 [...]
[...] 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. [...]
oh Mark.
how i thank you for this. thank you!
[...] 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 [...]
Does this make the enforce-www-preference plugin redundant?
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).
not bad at all…will experiment with it
[...] 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 [...]
[...] 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 [...]
[...] 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 [...]
Nice Site!
[...] to Mark Jaquith, an official contributing developer to the WordPress project: My goal for WordPress 2.3 was to [...]
[...] 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 [...]
[...] 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. [...]
[...] 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“. [...]
[...] 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. [...]
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.
Well I found out that wordpress 2.3 won’t fox permalinks on a webhost that interferes with them.
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!
Thank you.
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
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.
[...] Jaquith of Mark on WordPress discusses WordPress 2.3 Canonical URLs and the problems they may [...]
Yes. It incorporates that functionality.
Thanks for the plugin. Fixes a problem with Yahoo hosted sites.
More details here: http://wordpress.org/support/topic/135725?replies=5
[...] 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 [...]
Awesome stuff this. Thanks!
[...] 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. [...]
[...] Canonical URLs are also supported in WordPress 2.3 - a significant improvement. [...]
These built in redirects…are they supposed to be 302 redirects?
And if so, is there anyway to change them to be 301 redirects?
[...] 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 [...]
[...] 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. [...]
[...] 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. [...]
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?
[...] URL Canoniche sono supportate in questa [...]
Thank you very much for sharing…
This is nice article for sharing to other netter…
http://www.puthzel.com
Thanks…
[...] 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 [...]
[...] 「標準URL(カノニカルURL)」と名付けたシステムにて、URLまわりをすっきりさせました。これにより、WWW がドメイン名の頭につかないよう強制的に変更したり、記事スラッグが変更された記事の古いURLをリダイレクトしてリンク切れをなくすようにしたり、メール内の途中で途切れたURLを、似たURLへリダイレクトしたりするなどの機能が追加されました。これらの機能は、ユーザーが迷ってしまうことを防ぐだけでけではなく、各記事に「標準URL」を割り当てることにより、検索エンジン最適化にも役立ちます。さらに詳しい情報は、こちらにて。 [...]
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.
[...] – Preparing for 2.3 WordPress 2.3 WordPress 2.3: Canonical URLs Upgrading to WordPress 2.3 Dexter Enhancing WordPress [...]
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.
[...] 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. [...]
[...] you’ve installed Mark’s plugin to disable canonical urls, deactivate it. This has been rolled into my plugin as [...]
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
[...] Enforce http://www. Preference I dropped the www NOTE: This plugin is now redundant with 2.3. [...]
[...] Visit [...]
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?
[...] 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 [...]
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.
I was useful very much.
Thank you
[...] В админке во вкладке Options - General проверяю Blog address (URL). Я придерживаюсь философии no-www, поэтому проверяю, чтобы в данном поле был введен адрес без http://www. Если речь идет о простом сайте или скрипте WordPress ниже версии 2.3, то я вручную в .htaccess прописываю 301-й редирект на адрес без http://www. С версии 2.3 WordPress отлично канонизирует все адреса. [...]
[...] 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. [...]
[...] Canonical URLs [...]
use mod_rewrite, 301 redirect
[...] WordPress 2.3: Canonical URLs [...]
[...] 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. [...]
[...] 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. [...]
good work
[...] problem is due to the canonical redirection functionality, it redirects incorrect permalinks to their correct [...]
[...] 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. [...]
[...] along with update notifications for WordPress and plugins. Mark Jaquith has a great write up on his canonical URLs [...]
[...] 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 [...]
I have just upgraded to wordpress 2.3.1.
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
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
[...] 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. [...]
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?
I want to say thank you again. I almost want to cry.
[...] 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 [...]
[...] 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. [...]
Thank you sir, you just saved me a very painful rollback.
[...] 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 [...]
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.
This is a great feature for WP - thanks so much for working on it.
[...] 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 [...]
Great stuff dude…
Its really nice n informative article with a basic understanding of Canonical Optimization.Thanks buddy..
Mind blowing article……….
jagksgchjkxZ B BJZBHZKXBZK
This plugin fixes the problem of the redirects, but it screws up my feedburner settings.
[...] 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 [...]
[...] Redirect (http://fucoder.com/code/permalink-redirect/) 0.8.1 (No longer necessary; built into core [...]
[...] WP discussion starts at 0:48. For an in-depth look at the canonical URL feature, check out my writeup of the feature. [...]
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?
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
[...] Kanonické URL, o kterých existuje jeden odborný článek, takže se tím nebudu dále [...]
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.
[...] 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 [...]
[...] 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 [...]
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…
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!
[...] redirects Nå som jeg har flyttet siden og gjort om endel så kommer WordPress sin “Canonical URLs” funksjon til sin fulle [...]
It is very nice to see that someone takes this issue seriously!!
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.