Add ability to set the default domain

Is there a feature request anywhere to allow setting the default domain much like you can with the free domain mapping plug-in over at WordPress.org? I just switched to the MUDev plug-in and I like it because it seems more stable, but it would be ideal to be able to set the default domain when several are mapped. For example the root domain and http://www.domain.com.

Is it possible now and I don’t see the option? Or is this something that could be added as a feature request?

  • Timothy
    • Chief Pigeon

    Hey brewlabs.

    Are you referring to the option to add multiple mapped domains to one website?

    Its not possible to set that up in our plugin, you can only add one domain to be mapped. The reason for this is SEO and Google. If you had multiple mapped domains to the same site then search engines would see this as a duplicate content.

    The best thing to do is just forward other domains into an existing mapped domain, this way search engines will see which is the domain is the main, default one. Domain forwarding is done either with your cPanel or at DNS level. Some registrars provide other ways to manage this.

    Hope this helps. :slight_smile:

  • brewlabs
    • WPMU DEV Initiate

    I want to map the following:

    domain.com

    http://www.domain.com

    but I want http://www.domain.com to be what it says in the URL. When I add both after commenting out line 30 it always shows the root domain. I use CNAMEs to manage my sites and therefore need the http://www.domain.com to be the default mapped URL.

    In the WordPress MU Domain Mapping plugin (http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/) you can choose your primary mapped domain.

  • brewlabs
    • WPMU DEV Initiate

    Still hoping for a follow up. I also noticed that the domain mapping plugin won’t let me map www at all. It converts it to the root domain which is a major problem! This seems to happen on new sites added. Sites that used to use the free domain mapping plugin have the www listed.

  • Timothy
    • Chief Pigeon

    Hey again.

    I see what you mean, I guess its never been an issue for me because I don’t use www, its a defunct subdomain which hasn’t really been needed for years.

    Over the years just like projects as GoPHP5 there are also those promoting no-www.

    Anyway, to add multiple domains you can either add the following to your wp-config.php:

    define('DOMAINMAPPING_ALLOWMULTI', 'yes');

    Or you can uncomment this around line 30 in the following file:

    wp-content/plugins/domain-mapping/domain-mapping.php

    Our plugin does not currently support www though. I know the addition was being considered so I’ll check on that and get back to you. :slight_smile:

    Take care.

  • brewlabs
    • WPMU DEV Initiate

    I uncommented line 30, but I can’t even add www as a mapped domain. I realize that www is unnecessary, but many of my clients don’t understand that and are a bit upset that the “www is missing”. The ability to choose with or without www would be a fantastic enhancement. Not everyone is ready to let go of their “www”.

    It’s also handy for hosting providers to use www as the URL because CNAMEs can be used to redirect. With root domains you have to manage a lot of IPs at the same time if you need to move things around.

    Please let me know what you find out. Thanks!

  • isis
    • Design Lord, Child of Thor

    Hi Brewlabs,

    Is your site and your database set up as www? [For instance, when you visit the site, is there a www in the address bar?]In the last site I set up, I did not have it set up as a www site, just http://domain.com

    If that is the situation then you will have to tweak some settings to get the www in there…I can help you with that if it is the problem – been there and done that one :slight_smile:

    Cheers!

    Isis

  • isis
    • Design Lord, Child of Thor

    Okay,

    For me, I used my host company’s live support to help walk me through this…. I used the method of changing the URL name directly through the database. In your cPanel, use phpMyAdmin, and log in. Once you are logged in, there will be a list of databases on the left. Choose your wordpress database and then you will choose wp_options and then click the “Browse” button that should show up on the right. Down below a list of database entries will show, the second one should be the URL. You will want to click on it and a box should open where you can change the url from domain.com to http://www.domain.com. Depending on how much you have created in the database, you may have to do this for several more entries, especially if there are several blogs already set up, each of those will have places to change the name.

    Search for “Changing the URL directly in the database ” on this page: http://codex.wordpress.org/Changing_The_Site_URL

    There you will see there are many different ways to do it, but I found the database way was the easiest, however at the time I did not have a ton of entries to change. Definitely hit your host up for some help if you have live customer support!

    Hope this helps!

    Isis

  • brewlabs
    • WPMU DEV Initiate

    That’s not a bad idea. In fact, I had thought of it but I still need to figure out a way to make both the “www” and the root domain load the site (but be able to specify in some cases www as the default URL).

    Have you ever done this in conjunction with a cpanel redirect of the root domain to “www.domain.com”? That might be something to try this week.

    Thanks

  • isis
    • Design Lord, Child of Thor

    I have not ever done a re-direct like that…I don’t think anyway….

    Conceivably it should work, however :slight_smile: I’ll ponder that a bit as I relax this evening, something might come to me or hopefully to someone who’s smarter than me on these boards :smiley: I think you are moving in the right direction, however!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.