Enforce www. Preference

About

This plugin will help preserve your permalinks by enforcing your no-www or yes-www preference (http://example.com/ vs. http://www.example.com/) and will strip off index.php from the ends of URIs.

Download

Instructions

  1. Download and unzip
  2. Upload enforce-www-preference.php to /wp-content/plugins/
  3. Activate from within the WordPress admin interface

Versions

  • Version 1.3 Changed the name, and moved to my /code/ section
  • Version 1.2 Initial release

I’ve spent a lot of time writing this code and supporting it. If you derive some benefit from this code, please consider showing your gratitute in a more tangible
way. Thanks!

I have received $0 this month for my coding efforts.

Donate with PayPalAmazon.com Wishlist


494 Responses to “Enforce www. Preference”

  1. [...] Enforce WWW Preference – Proporciona una redirección 301 para mantener una indexación correcto, ya sea con o sin “www”. [...]

  2. [...] Enforce www. Preference – Provides 301 redirects to queries with /index.php and enforces your use or non-use of www. People use this beacuse [...]

  3. I’ve been looking for a plugin like this for ages – would be interested in finding out how to do similar on a static web site

  4. [...] Enforce WWW PreferenceProvides 301 redirects to queries with /index.php and enforces your use or non-use of www. By Mark Jaquith. [...]

  5. [...] Enforce WWW Preference – Provides 301 redirects to queries with /index.php and enforces your use or non-use of www to make sure your search engine indexing is uniform. [...]

  6. [...] Another problem, even one that I fell victim to with this blog, is not enforcing the WWW prior to my link, sure http://www.internet-marketing-data.com will work but I’m not enforcing it. I simply overlooked this, funny as this is my internet marketing blog and all my non related blogs are set up correctly! Oh well, we all make mistakes. Anyhow, by not enforcing the www prior to your domain name you are leaking page rank and value as a result! Don’t let this happen and get full credit for your page. Add this plug in, as it will take care of it for you, automatically. Enforce WWW preference. [...]

  7. [...] Enforce www. Preference – 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  8. [...] The best way to solve this problem is to set a 301 redirect. Sometimes, however, you might find it difficult to get the PHP code working or your server might not support the .htaccess redirect. In that case you can turn to a Wordpress plugin called “Enforce www. Preference”. [...]

  9. [...] Enforce WWW Preference – 使用301永久重定向强迫访问者或搜索引擎访问博客时使用统一的域名。 [...]

  10. [...] Enforce www. Preference – This plugin will help preserve your permalinks by enforcing your no-www or yes-www preference (http://example.com/ vs. http://www.example.com/) and will strip off index.php from the ends of URIs. [...]

  11. [...] Enforce www. Preference – 此插件可以强制你的永久链接使用www或是强制不使用www(http://example.com/ vs. http://www.example.com/)。还可以去掉URL结尾的index.php。 [...]

  12. [...] Enforce www. Preference – will help preserve your permalinks by enforcing your no-www or yes-www preference and will strip off index.php from the ends of URIs. [...]

  13. www.it4j.com says:

    [...] Enforce www. Preference – 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  14. [...] and without www. On this blog, I tried to rectify these with the aid of WordPress-no-www plugin, enforce-www plugin, objection redirection plugin and WordPress-www-redirect plugin but all vain efforts so far on this [...]

  15. [...] Enforce www. Preference – 此插件可以强制你的永久链接使用www或是强制不使用www(http://example.com/ vs. http://www.example.com/)。还可以去掉URL结尾的index.php。 [...]

  16. [...] Enforce www. Preference – will help preserve your permalinks by enforcing your no-www or yes-www preference and will strip off index.php from the ends of URIs. [...]

  17. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  18. [...] Enforce www. Preference – will help preserve your permalinks by enforcing your no-www or yes-www preference and will strip off index.php from the ends of URIs. [...]

  19. [...] Enforce WWW Preference – Proporciona una redirección 301 para mantener una indexación correcto, ya sea con o sin “www”. [...]

  20. [...] Enforce www. Preference – will help preserve your permalinks by enforcing your no-www or yes-www preference and will strip off index.php from the ends of URIs. [...]

  21. [...] Enforce www. Preference – 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  22. [...] Enforce WWW Preference – 提供301 重定向功能。 Excerpt Editor – 提供一個那MT後台那樣的摘錄編輯框。 [...]

  23. Ian says:

    I uploaded the plugin, changed the blog URL, and now my site is down. This plugin could benefit from a more precise tutorial, I guess.

  24. I have a question… I just installed this plug-in on both of my sites and it activated correctly. When I check with a ‘website grader’, it doesn’t give me an error about having both the www and non-www options enabled. But – when I activate this plug-in and try to visit my sites (with or without the ‘www’), I just get a Firefox error that says there’s a redirect loop and it can’t access my sites.

    Am I doing something wrong? Any help would be appreciated… Thanks!

  25. Mark says:

    Deb, you might have a redirect rule in your .htaccess that counteracts this plugin. In any case, it isn’t needed in recent versions of WordPress.

  26. Great tool! I love not being required to manually modify my .htaccess file to enforce the www redirect. Keep up the good work.

  27. [...] Enforce www. Preference: Força o uso de www ou não em seu [...]

  28. Jason Cramer says:

    I was looking through my site’s theme and found some of your plugin’s code. I’m not sure that I even have the plugin, but it must have been part of the theme or another plugin that I have.

    I guess your plugin makes it better for Search Engine Optimization, so props to you.

    Thanks

  29. Is this still necessary with the release of wordpress 2.7? There’s an option in wordpress to do this out of the box in the settings section. Right?

    Thanks!
    Jonathon

  30. Great tool! I love not being required to manually modify my .

  31. [...] All-in-One-SEO WordPress

  32. [...] All-in-One-SEO WordPress

  33. [...] Enforce www. Preference – 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  34. [...] Enforce www. Preference – zwingt den Aufruf Ihre Webseite nur mit -www oder ohne-www (verhindert somit doppelten Content Siehe Google Richtlinien). [...]

  35. [...] Enforce www. Preference - This plugin will encorce your www preference to prevent confusion of search engine spiders.  Also will prevent your site from having its page rank split up. [...]

  36. [...] Enforce www. Preference – permette di gestire il reindirizzamento dei lettori alla versione con o senza “www.” davanti all’indirizzo del blog. [...]

  37. [...] Enforce WWW Preference – 使用301永久重定向强迫访问者或搜索引擎访问博客时使用统一的域名。 Excerpt Editor – 摘要编辑功能。 FeedBurner FeedSmith – 确保所有的Feed地址都被重定向到FeedBurner。 Fix Database – 检查Wordpress数据库错误并尝试修复。 Genki Announcement – 公告,支持多种显示方式。 Genki Pre-Publish Reminder – 提示对日志进行分类。 Google Analyticator – 在所有页面添加Google Analytics统计代码。 Google Sitemaps Generator – 自动生成Google Sitemaps。 GT Post Approval – 在多用户博客中以管理员身份查看日志时添加“Approve”和“Reject”按钮。 Instant Update – 一键自动将Wordpress升级到最新版本。 Just Unzip – 在日志撰写页面上传一个压缩包,该插件将自动解压并添加其包含的内容到当前日志。 Khanh’s Instant Notepad (KIN) – 增加笔记功能。 Leprakhauns Word Count – 在日志编辑页面添加字符计数功能。 Mass Post Manager – 批量删除或移动某一分类的日志。 Mutliply – 允许仅设置唯一的管理员管理多个博客。 NextGEN Gallery – 在后台添加相册,甚至Flash相册。 OneClick Install – 更强大的插件或主题上传安装功能。 Page Link Manager – 更轻松的管理静态页面。 [...]

  38. [...] Enforce www. Preference – 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  39. [...] Enforce www. – Ajuda a preservar a existência ou não, de acordo com sua preferência, do “www.” nos [...]

  40. [...] Wordpress gibt es da übrigens auch schon ein fertiges Plugin, welches einem die Arbeit abnimmt. Das benutze ich auch hier für diesen Blog dafür. Wer also nur [...]

  41. [...] Enforce www. Preference – Ajuda a preservar a existência ou não, de acordo com sua preferência, do “www.” nos permalinks de seu blog. [...]

  42. [...] DupPrevent Plugin – 防止你的博客因为重复内容被google惩罚。 Enforce WWW Preference – 使用301永久重定向强迫访问者或搜索引擎访问博客时使用统一的域名。 [...]

  43. [...] Enforce WWW Preference – Proporciona una redirección 301 para mantener una indexación correcto, ya sea con o sin “www”. [...]

  44. [...] Enforce WWW Preference – 使用301永久重定向强迫访问者或搜索引擎访问博客时使用统一的域名。 [...]

  45. [...] thẻ tiêu đề của bài viết, của trang, của category và tag của các trang, v.v.. Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời [...]

  46. [...] Enforce www. Preference – 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  47. [...] wordpress的50个最好用的插件的文章, 在使用 Enforce www. Preference 的时候遇到一个问题, 插件安装完毕后在setting –> general 里不止要修改 [...]

  48. [...] Enforce www. Preference- 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  49. [...] Enforce www. Preference- 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  50. [...] Enforce WWW Preference – 使用301永久重定向强迫访问者或搜索引擎访问博客时使用统一的域名。 Excerpt Editor – 摘要编辑功能。 FeedBurner FeedSmith – 确保所有的Feed地址都被重定向到FeedBurner。 Fix Database – 检查Wordpress数据库错误并尝试修复。 Genki Announcement – 公告,支持多种显示方式。 Genki Pre-Publish Reminder – 提示对日志进行分类。 Google Analyticator – 在所有页面添加Google Analytics统计代码。 Google Sitemaps Generator – 自动生成Google Sitemaps。 GT Post Approval – 在多用户博客中以管理员身份查看日志时添加“Approve”和“Reject”按钮。 Instant Update – 一键自动将Wordpress升级到最新版本。 Just Unzip – 在日志撰写页面上传一个压缩包,该插件将自动解压并添加其包含的内容到当前日志。 Khanh’s Instant Notepad (KIN) – 增加笔记功能。 Leprakhauns Word Count – 在日志编辑页面添加字符计数功能。 Mass Post Manager – 批量删除或移动某一分类的日志。 Mutliply – 允许仅设置唯一的管理员管理多个博客。 NextGEN Gallery – 在后台添加相册,甚至Flash相册。 OneClick Install – 更强大的插件或主题上传安装功能。 Page Link Manager – 更轻松的管理静态页面。 [...]

  51. [...] Enforce www. Preference- 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  52. [...] Enforce www. Preference-Mandatory membership in the address / remove the WWW prefix or suffix index.php [...]

  53. [...] Enforce www. Preference – 在網址中強制加入/去掉WWW前綴或者index.php [...]

  54. [...] Enforce www. Preference – 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  55. [...] Enforce WWW Preference- Этот плагин поможет записать доменное имя с WWW или без. [...]

  56. [...] URL” Problem von vorneherein mit einem Plugin zu verhindern. Hierfür nutze ich “Enforce WWW Preference“, da es mir die Wahl lässt, ob der Blog ausschließlich mit oder ohne www erreichbar [...]

  57. [...] Enforce www. Preference – will help preserve your permalinks by enforcing your no-www or yes-www preference and will strip off index.php from the ends of URIs. [...]

  58. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  59. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  60. [...] Enforce www. Preference – Ajuda a preservar a existência ou não, de acordo com sua preferência, do “www.” nos permalinks de seu blog. [...]

  61. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  62. [...] Enforce www. Preference- 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  63. [...] Enforce WWW Preference - 使用301永久重定向强迫访问者或搜索引擎访问博客时使用统一的域名。 Excerpt Editor - 摘要编辑功能。 FeedBurner FeedSmith - 确保所有的Feed地址都被重定向到FeedBurner。 Fix Database - 检查Wordpress数据库错误并尝试修复。 Genki Announcement - 公告,支持多种显示方式。 Genki Pre-Publish Reminder - 提示对日志进行分类。 Google Analyticator - 在所有页面添加Google Analytics统计代码。 Google Sitemaps Generator - 自动生成Google Sitemaps。 GT Post Approval - 在多用户博客中以管理员身份查看日志时添加“Approve”和“Reject”按钮。 Instant Update - 一键自动将Wordpress升级到最新版本。 Just Unzip - 在日志撰写页面上传一个压缩包,该插件将自动解压并添加其包含的内容到当前日志。 Khanh’s Instant Notepad (KIN) - 增加笔记功能。 Leprakhauns Word Count - 在日志编辑页面添加字符计数功能。 Mass Post Manager - 批量删除或移动某一分类的日志。 Mutliply - 允许仅设置唯一的管理员管理多个博客。 NextGEN Gallery - 在后台添加相册,甚至Flash相册。 OneClick Install - 更强大的插件或主题上传安装功能。 Page Link Manager - 更轻松的管理静态页面。 [...]

  64. [...] Enforce www. Preference : Its very important to stick to one version of your blog url either www or without www. When you [...]

  65. [...] Enforce www. Preference – will help preserve your permalinks by enforcing your no-www or yes-www preference and will strip off index.php from the ends of URIs. [...]

  66. [...] Enforce WWW Preference - 使用301永久重定向强迫访问者或搜索引擎访问博客时使用统一的域名。  Excerpt Editor - 摘要编辑功能。  FeedBurner FeedSmith - 确保所有的Feed地址都被重定向到FeedBurner。  Fix Database - 检查Wordpress数据库错误并尝试修复。  Genki Announcement - 公告,支持多种显示方式。  Genki Pre-Publish Reminder - 提示对日志进行分类。  Google Analyticator - 在所有页面添加Google Analytics统计代码。  Google Sitemaps Generator - 自动生成Google Sitemaps。 [...]

  67. [...] Enforce www. Preference : Its very important to stick to one version of your blog url either www or without www. When you [...]

  68. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  69. Eriza says:

    mantap kali

  70. [...] Enforce www. Preference – permette di gestire il reindirizzamento dei lettori alla versione con o senza “www.” davanti all’indirizzo del blog. [...]

  71. [...] Enforce www. Preference – 在地址中强制加入/去掉WWW前缀或者index.php后缀 [...]

  72. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  73. pes-patch says:

    We must use this tool

  74. [...] Enforce www. Preference – will help preserve your permalinks by enforcing your no-www or yes-www preference and will strip off index.php from the ends of URIs. [...]

  75. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  76. richard says:

    I don’t think you need this plug in in newer versions of Word Press. Go to settings and just change the URL from http://yoursite.com to
    http://www.yoursite.com.
    Works!

  77. [...] Enforce WWW Preference – 使用301永久重定向强迫访问者或搜索引擎访问博客时使用统一的域名。 Excerpt Editor – 摘要编辑功能。 FeedBurner FeedSmith – 确保所有的Feed地址都被重定向到FeedBurner。 Fix Database – 检查Wordpress数据库错误并尝试修复。 Genki Announcement – 公告,支持多种显示方式。 Genki Pre-Publish Reminder – 提示对日志进行分类。 Google Analyticator – 在所有页面添加Google Analytics统计代码。 Google Sitemaps Generator – 自动生成Google Sitemaps。 GT Post Approval – 在多用户博客中以管理员身份查看日志时添加“Approve”和“Reject”按钮。 Instant Update – 一键自动将Wordpress升级到最新版本。 Just Unzip – 在日志撰写页面上传一个压缩包,该插件将自动解压并添加其包含的内容到当前日志。 Khanh’s Instant Notepad (KIN) – 增加笔记功能。 Leprakhauns Word Count – 在日志编辑页面添加字符计数功能。 Mass Post Manager – 批量删除或移动某一分类的日志。 Mutliply – 允许仅设置唯一的管理员管理多个博客。 NextGEN Gallery – 在后台添加相册,甚至Flash相册。 OneClick Install – 更强大的插件或主题上传安装功能。 Page Link Manager – 更轻松的管理静态页面。 [...]

  78. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  79. alexa says:

    Great ill use that great tip at my new canadia dating site http:person.al
    xoxo

  80. alexa says:

    Great ill use that great tip at my new canadia dating site http://person.al

  81. cgreality says:

    Для тех, кто мечтает о покупке недвижимости одним из лучших предложении будет недвижимость в Черногории. Это, во-первых, прекрасное вложение денежных средств, а, во-вторых, отличное место для сезонного отдыха. Для российского гражданина, желающего приобрести недвижимость в Черногории, власти препятствий не создают. При покупке недвижимости в Черногории вид на жительство предоставляется автоматически. Купить квартиру в Словении также очень легко. Одним из способов приобретения недвижимости в Словении является создание фирмы, с начальным капиталом около 10000 евро. Цены на недвижимость в Черногории и квартиры в Словении намного меньше, чем на побережье Черного моря – в Сочи или в Туапсе.

  82. [...] Enforce www. Preference – giúp bảo bệ parmentlink của bạn có www hoặc không có www, và đồng thời chuyển index.php phía sau của URL. [...]

  83. [...] has five plugins only working on his own blog: Akismet, Cookies for Comments, Enforce www. Preference, Feedburner Feedsmith, Wp Super [...]

  84. [...] Enforce www.Preference Most stats tracking suites do not interpret visits to soyouwanttoteach.com the same as ones to http://www.soyouwanttoteach.com. Enforce http://www.Preference provides a 301 redirect anytime someone goes to soyouwanttoteach.com and sends them instead to http://www.soyouwanttoteach.com. More accurate statistics! [...]

  85. [...] Enforce WWW Preference – Proporciona una redirección 301 para mantener una indexación correcto, ya sea con o sin “www”. [...]

  86. [...] Enforce WWW Reference Homepage [...]

  87. [...] Enforce www. Preference-Mandatory membership in the address / remove the WWW prefix or suffix index.php [...]

  88. [...] funcția principală de redirectare, ceea ce ar necesita învechitul Feedburner FeedSmith și Enforce www. Preference. Și cu cât mai puține pluginuri, cu atât mai puține probleme de incompatibilitate, server load [...]

Leave a Reply