How to disable the default WordPress redirect to non-www URLs?

Answer: Don’t disable it, use it to do the redirection you want.

  • If you have a subdomain install, then you cannot do this at all, the www is a subdomain.

  • If you have a sub-directory install and want all the sites to be www, then edit your wp-config.php and change the DOMAIN_CURRENT_SITE to be your www domain.

  • If you are using domain mapping, then use the domain mapping plugin to change the domain to have a www in it.

In the latter two cases, the point is that you’re not using .htaccess to do the redirection, you’re letting WordPress do the redirection to what it expects the URL is supposed to be.