Can you use WWW in mainsite url (7 posts)

  1. handig
    Posted 3 years ago #

    Was wondering if it is a problem to have WWW in the url of the mainsite. It seems to work, but I want to be sure I'm not missing anything before adding more sites to it.

    I setup my subdomain wordpress multisite install with: define('DOMAIN_CURRENT_SITE', 'www.mymuwebsite.com');

    I noticed that subsites get URL's like subsitename.www.mymuwebsite.com

    As I use the MU domainmapping tool it doesn't seem like a problem, or I'm I missing something?

  2. Mohd Rafie
    Posted 3 years ago #

    This has been discussed here -

    You also read the documentation on the Server Address.

  3. handig
    Posted 3 years ago #

    thanks I'll go there with my questions.

  4. Mohd Rafie
    Posted 3 years ago #

    I quote:

    "We recommend you change your siteurl to example.com before enabling the network feature. It will still be possible to visit your site using the www prefix with an address like http://www.sample.com but any links will not have the www prefix."

    But if you are using domain mapping tool, it doesn't have any problem. But maybe not the best practice to run a multisite. Just my personal opinion.

    I'd rather having http://www.example.com/subdomain rather than subdomain.www.example.com :)

  5. Was wondering if it is a problem to have WWW in the url of the mainsite.

    Actually even with mapping domains, the weird issue with www's remain for your main site :/

    I wish I knew why it got stupid.

  6. handig
    Posted 3 years ago #

    I guess I have to change it to without the WWW.

    But what steps should I take to 'take the WWW out of the mainsite url"?

    I have a rather big database so I would like to do it directly in the database (I know it's risky, but i'll backup). Í was thinking about the following steps:

    A.Change the domain and absolute path in in mySQL database by removing the WWW:
    1. Options table fields siteurl
    2. options table field home
    3. metasite table field siteurl.

    B.Change the line define( ‘DOMAIN_CURRENT_SITE’ to without a WWW

    I'm I forgetting some fields or do you have a better approach for removing the WWW?

  7. I would use the search/replace tool listed here: http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite

    And then go back through and look for www in the options/blogs/sites tables

Topic Closed

This topic has been closed to new replies.

About this Topic