Domains resolving to non-www version

Hi everybody,

I'm using Doncha's domain mapping plugin and, after installing WPMUDEV's sitemap's plugin I wanted to give a try to your domain mapping plugin.

I've installed it, replace Doncha's one, and everything's working fine...but all the URLs are resolving to non-www version. That is, in Doncha's plugin you had the ability to map 2 URLs to a given domain (that is, http://www.mydomain.com and my domain.com), and then choose your default url (in my case, the ones with www).

But now, if I type http://www.mydomain.com/ the URL is rewritten to http://mydomain.com/

I've deleted the previous mapping and set it to "www.mydomain.com", but it's not working.

Any ideas?

Thanks in advance.

  • DavidM
    • DEV MAN’s Mascot

    Hiya,

    I don't recall the MU Domain Mapping plugin working any differently in that regard. From what I remember, it doesn't allow for www variants. Are you able to successfully use both www and non-www urls at the same time with it?

    As for allowing more than one domain name per sub-site in the Domain Mapping plugin here, the instructions mention the following:

    To enable multiple domains to be mapped to one site simply uncomment line 30 of domain-mapping.php by removing the // at the beinning of the line.

    And you should be able to add that uncommented line to your wp-config.php file as well, so that plugin updates wouldn't overwrite your changes. That would let you specify more than one domain name.

    However, that would not allow entering a 'www' variant. For the most part, 'www' isn't recognized any differently than non-www urls and generally, non-www urls are the way to go. That's very much the case with WordPress Multisite, which definitely prefers non-www, at least with the main site. It takes quite a bit to have it work otherwise.

    -David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.