WordPress.org

Ready to get started?Download WordPress

Forums

My Sites sub-domains show incorrect URL (17 posts)

  1. davehprohoods
    Member
    Posted 10 months ago #

    I have a multisite set up where sub-sites are sub-domains, but when I hover over My Sites in admin, any links to the sub-sites show subdomain.domain.com, whereas I want subdomain.com instead.

  2. Dance_Business
    Member
    Posted 10 months ago #

    Do you mean you host blahblah.com
    And under the same hosting account/package you have bububu.com and it's pages beyond the index show as http:// blahblah.com/bububu/products-and-options/

    That is my problem. Hoping we both get answers!

  3. davehprohoods
    Member
    Posted 10 months ago #

    No, the multisite is set up for sub-domains. I used the WordPress MU Domain Mapping plugin, then map subdomain.domain.com to subdomain.com. If I log in to subdomain.com/wp-admin, it routes that site properly, but if I go to My Sites > sub-site, it always goes to subdomain.domain.dom/wp-admin. It's really annoying and I'm not sure how to configure it to just use the mapped sites.

  4. Josef
    Member
    Posted 10 months ago #

    As far as I can tell, what happens is that WordPress is primarily using the subdomains internally. When you open the admin menu, it goes to subdomain.domain.com and gets redirected from there, so subdomain.domain.com needs to work.

    Unless you haven't entered a wildcard subdomain ("*.domain.com") in your DNS, there is no difference in the outcome. There is also no difference between subdomain.domain.com/wp-admin and subdomain.com/wp-admin. What *exactly* is it that you'd like to achieve, and what *exactly+ is the present behaviour?

    If it's just the cosmetics of the navigation: I don't care, it's just the backend. It's neither user-relevant nor search-engine relevant. There are many more important places that need to consistently use the mapped sites before I'd start worrying about the admin menu.

    If you get a browser error when navigating to subdomain.domain.com/wp-admin, you need to enable the wildcard subdomain (or every subdomain individually). It will still use the subdomain style, but you won't notice it anymore :-)

    Otherwise, I'm missing the point.

  5. davehprohoods
    Member
    Posted 10 months ago #

    We have a 3.5 install that directs properly to subdomain.com. It was configured before my time so I don't know exactly how they did it, but it is set up for sub-folders and used a different domain mapping plugin, so is that required to do this right? The main reason I don't want the sub-domain format to show is for plugin usage and consistent user experience.

    It effects all users (not just admin) regardless of which site they log into, and I don't want them to see the primary site in the URL with their site as a sub-domain, just the site they have access to as the domain.

  6. Josef
    Member
    Posted 10 months ago #

    Sorry... as far as I can tell, the domain mapping is done by the plug-ins, so without knowing more about the set-up in general and the plug-in in particular, I'm not sure if there's help.

  7. davehprohoods
    Member
    Posted 10 months ago #

    I followed the instructions here to create a network: http://codex.wordpress.org/Create_A_Network

    All default settings except in relation to URL/path etc.

    Then I ran this plugin: http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

    With these settings checked in Domain Mapping (+ is checked, - is unchecked):
    - Remote Login
    + Permanent redirect (better for your blogger's pagerank)
    - User domain mapping page
    - Redirect administration pages to site's original domain (remote login disabled if this redirect is disabled)
    + Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.

  8. jkhongusc
    Member
    Posted 10 months ago #

    IMO, you should try unchecking:
    Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.

    We use WP subdomain with the domain mapping plugin too. Funny thing is that our settings are the exact opposite of yours.

  9. but when I hover over My Sites in admin, any links to the sub-sites show subdomain.domain.com, whereas I want subdomain.com instead.

    That's not a bug, the plugin doesn't re-write those. That said they should redirect to the main site, and people won't really notice. It's not like you can't tell you're on a Multisite anyway.

    To fix it, you'd have have to add in a filter (I don't know what specifically) to adjust My Sites as well.

  10. davehprohoods
    Member
    Posted 10 months ago #

    jkhongusc, that suggestion didn't fix it, but I found something that sort of worked: unchecking everything but:

    + Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues.

    This made it so that going to subdomain.com and logging into /wp-admin showed correctly, along with hovering over the site title in admin and clicking Visit Site, but nothing I do gets My Sites to show subdomain.com properly... the links always show subdomain.domain.com... so any user of our sub-sites will see the parent site in the URL and their site as a subdomain... I'm seeing no way to fix this. This could break our plugins if they're checking for subdomain.com...

  11. Josef
    Member
    Posted 10 months ago #

    That's precisely my set-up, too. (I'd have to check the plugin settings, though). As far as I can tell, http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/ is part of WordPress, even though it's not part of the standard shipment.

    The external (front-end) links are clean, it's just the backend that's affected. I'm worried about users (visitors) and search engines, for the users (sub-site admins) I'm more relaxed.

  12. davehprohoods
    Member
    Posted 10 months ago #

    If anybody knows a solution to have WordPress show only the proper subdomain.com links instead of subdomain.domain.com, I would really love to see it. In the meantime I will be looking into hacking it or developing a plugin for it, as this can negatively affect our admin users even if they are not "admin" roles.

  13. so any user of our sub-sites will see the parent site in the URL and their site as a subdomain

    Sure. But WHY do you see that as a problem? Understanding that may help us help you find an answer :)

    As far as I can tell, http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/ is part of WordPress, even though it's not part of the standard shipment.

    It's a plugin. That's what plugins are :) They're parts of WP you add yourself.

  14. jkhongusc
    Member
    Posted 10 months ago #

    > If anybody knows a solution to have WordPress show only the proper subdomain.com links instead of subdomain.domain.com, I would really love to see it.

    When we configure our subdomains, we never see the subdomain.domain.com anywhere in the admin/network admin areas. We do one other configuration which Mika has said in the past is not necessary or should not be done. But it works for us...

    This is our process for creating a site:
    1) create new site subdomain.domain.com
    2) map to domain subdomain.com
    3) Go to the site's setting and replace all 'subdomain.domain.com' with 'subdomain.com'

    The site's setting is located at wp-admin/network/site-settings.php?id=<siteid> -> Settings tab. I believe we change the siteurl and home attributes.

  15. davehprohoods
    Member
    Posted 9 months ago #

    I mentioned multiple times why it's bad to show the domain as a sub-domain to another site to our users. It confuses them and causes copy-and-pasting to be inaccurate and the recipients to be confused and cause the same questions to be asked over and over; sorry, our bad we have to say.

    I don't understand why there's no effort to do it properly to begin with, or little desire to do it properly now. WordPress allows multiple sites, it should display them properly in the address bar and in links across all pages. This doesn't seem like a difficult fix or implementation.

  16. edurila
    Member
    Posted 9 months ago #

    @davehprohoods

    The best solution it seems for you is to use domain mapping service.

    You just need to install the domain mapping plugin and then get an dedicated Ip to your hosting or server.

    And then you can redirect all of your users userwebsite.yourwebsite.com subdomain to their own private domain.

    I hope it helpd you understand how it works

    Cheers
    [signature moderated]

  17. I mentioned multiple times why it's bad to show the domain as a sub-domain to another site to our users. It confuses them and causes copy-and-pasting to be inaccurate and the recipients to be confused and cause the same questions to be asked over and over; sorry, our bad we have to say.

    But ... they DON'T see it. That's the thing we're not getting.

    Look, there are two, and only two, locations where they MIGHT possibly see it:

    1) wp-admin/my-sites.php
    2) The toolbar dropdown.

    In both cases, when you click on the link, you're redirected to the 'correct' URL.

    I'm honestly surprised to hear that you have users who find this confusing because in the last 3 years no one's brought it here :/ I mean for them to get that wrong, your site admins, who are the ones who see that by the way, they'd have to be rightclicking from those locations and pasting. Which frankly NON technical people rarely do.

    I would take a page from wp.com and redirect the my-sites URL to something like http://en.wordpress.com/my-blogs/ where you customize the list. It's easy to do with .htaccess.

    As for the my-sites dropdown, I'd use a function to yank if from the menu bar anyway, and replace with a link to my-blogs.

Reply

You must log in to post.

About this Topic

Tags

No tags yet.