Categories Asides WordPress WordPress no-www Post author By Matt Post date June 13, 2006 59 Comments on WordPress no-www After being frustrated with mod_rewrite mojo, I wrote a quickie no-www plugin for WordPress that redirects people to the non-www version of your URLs, in the spirit of no-www.org. Update: This is now built into WordPress through the “canonical URLs” feature, just go to the General Settings page and remove “www” from the blog and WP URLs. Share this: Related Blogging by DegreesJune 2, 2003In "Web"WordPress Plugin StatsSeptember 26, 2007In "Asides"Random Redirect PluginApril 22, 2007In "Asides" Tags Plugin ← Beeping → Cave Explorer 59 replies on “WordPress no-www” Hi Matt, Thanks for wrapping this into a plugin. I’d implemented the no-www Apache script to solve a host of Ajax issues with my WordPress install but it’s good to have a solution that works with WP’s existing .htaccess editing Good stuff Matt. Is there a way I can reverse this and have everyone coming from http://domain.com redirect to http://www.domain.com Hey, that’s handy – thanks! thank you! I’m using this now and it works perfectly! All I had to do was activate it. That’s it! It rocks! I love easy plug-ins like that! Thanks! Heh, DreamHost has a neat little util in the panel that lets you do exactly that. I’m proud to say I’ve been no-www for quite some time now! Good idea to write a plugin though. I don’t think people realize how much of a hit they take in search engine ranking when they allow both www and no-www. Check out digg’s ranking vs. slashdot on http://populicio.us/fulltotal.html. Digg’s combined numbers easily beat out slashdot, but because its numbers are split due to www and no-www, it sits at 6th and 11th. Awesome! I’ve had the mod_rewrite rule in my .htaccess for a couple months. I just installed the plugin and erased the mod_rewrite rule. Everything works flawlessly. I’ve been experimenting with a different approach: root-relative WordPress addresses. The one downside I’ve found so far, and it’s minor, is that my RSS feed reader (Akregator) breaks the UA rules and doesn’t prepend the scheme/host to the relative URLs that now appear in the feed. I suppose I could force absolute URLs in the feed using a plugin. Isn’t that what Mark’s plugin does? Does this do the same as the plug-in called Objection redirection? Found here; http://wordpress-plugins.biggnuts.com/objection-redirection-wordpress-plugin/ I have downloaded this plug-in, but haven’t activated it yet because I found your new plug-in. Obviously I would go with yours over someone else any day. PS- could you also shed some light on this whole meta tag issue I’ve been reading on the net. The way I figure it, you are expert at all things WordPress; so if meta tags were a necessity, you would have built it all into WordPress to begin with. Thanks! Yep it looks exactly the same as those other plugins, except a little more bare. I should Google more! 🙂 ummm… if DNS is setup properly, you don’t have to use w3 anyway… w3 is not “required”. Hoover, it has nothing to do with DNS. man, I thought it was just me who didn’t like the http://www…. Methinks your plugin doth fail too much. Any link on your site I try to load that doesn’t have the www gives me a very silly 404 error. Um… http://photomatt.net/2006/06/13/wordpress-no-www/ 404 Not Found The resource requested could not be found on this server! Have you turned the plugin off? It doesn’t appear to be working on here! http://www.photomatt.net/2006/06/13/wordpress-no-www/ gets to this page just fine but… http://photomatt.net/2006/06/13/wordpress-no-www/ give a 404 Don’t know if it is temporary, but at 19:47 BST (GMT+1) I get this: http://photomatt.net/2006/06/13/wordpress-no-www/ = 404 not found Hey sorry guys, my site is messed up for another reason. When the password thing happened my site somehow got delisted from Google without the www, so I’ve been experimenting with changes to bring it back. awesome! i have struggled with the www vs non-www issue for awhile. […] Si, como yo, has optado por suprimir las ‘www’ de tu dominio o sitio web (hay discusiÃ³n al respecto, pero entiendo que hace mucho mÃ¡s sencilla la comunicaciÃ³n en la Red), Matt acaba de liberar un Ãºtil plugin que redirecciona cualquier referencia con ‘www’ de tu bitÃ¡cora hacia su correspondiente direcciÃ³n ‘limpia’. […] […] Matt got bored this afternoon and came up with the no-www plugin for WordPress that redirects people to the non-www version of your URLs. […] Ah, good to know Matt. Hot Dang! Just was I was trying to (unsucessfully) pull off via .htaccess last night. Thanks Matt! You ‘da man. I wrote a plugin that does it both ways… that is, it enforces your yes-www or no-www preference as set in Options » General. Enforce www. Preference Arggg…. http://www.whalesalad.com/2006/06/07/whats-up-with-these-urls/ Nice plugin.. But after I activated this plugin I noticed one problem. If I try to setup my blog via a weblog client say Flock or Qumana, I am getting a error while providing the authentication information(User Name/Password) The HTTP status code is 301. Even I tried to post a new blog from the already configured client and I was getting the same HTTP status. I deactivated the No-WWW plugin and everything was working fine !!! Probably you need to check on this. Ooops ! I guess I gave a feedback too soon. When registering the blog in the web log client if I give a “No-www” url its working fine 🙂 Appears this error: It needs to qualify the send of referrers so that this works. (Necesita habilitar el envÃo de referrers para que esto funcione.) I close all windows, and star again and works, strange, do you? Regards! @ Arrrgggghhh, indeed. Installed fine. (Except for a false error from WP “Sorry, you need to enable sending referrers for this feature to work.” Got the same error in two different browsers that have “sending referers” enabled. But… checked back and the plugin reported itself installed and the no-www.org site reported my blog as a “Class B” compliant site. Then, I becgan getting emails that my wp-comments-post.php page would not display. Yup. No comments. This plugin was the only change, so… went to deactivate it and… “Sorry, you need to enable sending referrers for this feature to work.” And this time, no deactivation. Guess I have to nuke the thing via ftp and seek a plugin (or other method) that’ll work w/o hashing things up. Nice idea. Works fine except for the comments issue and the weird “Sorry, you need to enable sending referrers for this feature to work,” error that cropped up for the very first time after installing this plugin. Yep. Just nuked the plugin via FTP and both issues are gone. […] Photo Matt, tireless tinkerer in all things WordPress, has devised a very slim (less than 1K) and elegant plugin to deal with something that’s chapped my gizzard for some time: that stupid and almost always superfluous “www” in a domain name. At least, he’s been able to nuke it for WordPress blogs. […] That plugin is fantastic 🙂 I just now need to get round to migrating away from Movable Type over to WordPress at somestage in the future. If you’re having problems, make user you change your URL under Options > General to not have a www. […] I’ve got to apologize to anyone who has seen some odd behavior on my blog in the last 24 hours. I’ve installed the no-www plug-in that Matt talked about a few days ago. For more info go to www. Is deprecated. […] Whoah… It’s doing the opposite for me. http://neosmart.net/blog/ goes to http://www.neosmart.net/blog/ And in my options page there is no www. Maybe it has to do with my blog being in a subdomain? I had no issues with Mark’s plugin, I’m only using this one because it’s lighter on the server. Oops! I meant on a subfolder – not subdomain. […] Photo Matt Â» WordPress no-www (tags: wordpress web20 no-www) […] […] WordPress Plugin: no-WWW Matt Mullenweg, einer der Entwickler von des WordPress Systems, hat das Plugin no-WWW verÃ¶ffentlicht, welches die Problematik der Erreichbarkeit des WordPress Weblogs mit und ohne WWW in der URL lÃ¶st. […] While this plugin and other like it will indeed work, I really recommend using the .htaccess method instead, if you can get it to work. It’s actually very simple to do. Go to http://no-www.org and scroll down the page until you find the post titled “Make your site Class B”. Copy that htaccess code into the .htaccess file at the root of your webpage. Change the “domain” to your own, obviously. Done and done. […] Did anyone notice it? Wala na akong www. sa website URI ko. I think it looks better kapag walang www. ang URI ko. Ayon sa no-www.org, www. is deprecated. Tingin ko tama sila. Read their entry, and instructions on how to do it. Pero wordpress users, siguro mas maganda kung ang gagamitin niyo ay yung plug-in ni Matt. […] […] Matt Mullenweg of WordPress fame has released a plug-in to automatically remove the WWW prefix. While this isn’t earth shattering news, it does show a trend away from the traditional prefixes to a simpler model. A change that I certainly welcome. […] […] No-www es un sencillo plugin para WordPress que redirecciona a http://tu-url.com. EstÃ¡ escrito por Matt. WordPress, Miniblog | Enlace permanente # | MenÃ©ame […] […] Last week, Matt introduced a plugin that takes all requests for the www version of a site and return a consistent non-www address with the appropriate redirect methods. The plugin, while working good, is only a partial solution as it does not include the index.php requests. […] […] No-www fue escrito por Matt. Via : Plugin no-www para WordPress […] This plugin, while useful, needs to use implode() on $_GET in order to pass query string variables such as, I don’t know, s= 😉 […] Nu har Matt (hovedmanden bag WordPress) dog skrevet et plugin, no-www, der klarer skidtet. Hermed burde du helt automagisk blive sendt vÃ¦k fra www-subdomÃ¦net. Vi takker. […] […] Everyone is aware of the continuous conflict caused by search engines indexing multiple variations of identical pages on the same domain. In an attempt to remedy this aggrivating issue, Matt created no-www; a plugin for wordpress developed with the intention on redirecting all www requests to non www location. However, not only is this non www important but what about the index.php issues? […] […] I have moved the information for the www-redirect plugin I released yesterday to a page of its own. The continuous plague of several pages being indexed using numerous variations of the same domain name has definately been experienced by most of us.Â In an attempt to remedy this extremely aggrivating issue; WWW-Redirect was born.Â Â Originating from the source of Matt’s no-www plug-in, www-redirect takes it a step or so further by allowing users to opt for different redirect settings.Â This plugin allows users to have more control over the uri in which their users access their blog.Â By doing so, you’re giving search engines and users a consistent link for accessing your content. […] btw in my comment #2 I mentioned how to reverse this. You can find a new great plugin by Justin at: http://www.justinshattuck.com/wordpress-www-redirect-plugin/ […] I posted a couple of months ago about dropping the www from URLs and have been a supporter of it for much longer. All of my sites have been www free for as long as I can remember. The http://www.xxxx.com URLs will redirect to the one without www. If you’re using WordPress and have been afraid to try out the .htaccess method Matt released the no-www plugin last month. Visit no-www.org for more information on the subject. Related Posts Drop the WWWPhotosiWhat?SupercomputerWhat Kind Of Blogger Are You? […] I implemented the plug-in on two sites (one running WP2.0.1, the other 2.0.3) using two different (but fully working) themes, and I found that comments got broken on both sites, leading to a blank page of wp-comments-post.php. Deactivating the plug-in fixed comments immediately. Both sites were running php 4.4.2 if that might have an effect… […] While www. is 4 characters, chetan. is 7 characters. So, my updated plugin code based on Matt’s no-www looks like this: […] […] Recently I spoke about WWW vs Non WWW and the Page Rank Splitting Issue. Today when I was in the process of restoring my favorite plugins, I accidentally deleted my .htaccess file, I tried to make mod_rewrite work, but for some strange reason it didn’t work. So I was in a search for an alternative and then I landed on Matt’s No-WWW plugin page. […] […] engines see both domain names as one site. Matt has already done all the hard work, I installed the no-www plugin and validated as Class B site. Everything is working fine for me, if you face any problems do get […] Matt, you’re the man! I’ve been trying to figure out how to make this work for a few weeks. My host wouldn’t work with most of the options. This way works great. Thanks much. […] notice any problem. I changed the URL in my FeedBurner account. I’ve also installed Matt’s no-www plugin, which makes my site Class B validated (and I don’t know what that means, but it sounds good […] […] why the site was “down” for the better part was yesterday was that I installed this: no-www wordpress plugin. The silly mistake I committed was that I forgot when I set up JoshKim.org, I had asked for any […] […] Matt Mullenweg for Akismet and No WWW. […] […] and Shouldn’t Use. Number 1 on the list: Permalink Redirect, closely followed by Matt’s No-WWW plugin. Actually, since release 0.7, Permalink Redirect can already redirect on hostname mismatches, which […] Comments are closed.