• Interesting thing I only picked up on because of a code checker I tested. I have a number of wordpress multiuser sites setup, mostly to host my own domains with individual sites. I keep current wordpress 4.1.1. and I use the wordpress_mu_domain_mapping plugin. Everything works great, the sites come up correctly, I have both http://www.domain.com sites and thirdlevel.mudomain.com sites, no issues… but, the site_url isn’t coming up exactly correctly.

    I have tried to look to figure out what causes it, but I am not sure. specifically, everything (including items generated in wp_head) are missing the HTTP from the urls. So as an example, I get things like this:

    ‘<link rel=”profile” href=”//gmpg.org/xfn/11″ />
    <link rel=”pingback” href=”//www.domain.com/xmlrpc.php” />’

    remarkably, this doesn’t seem to cause any great functionality problems, as these links (if you look at code source under chrome) are still correctly clickable. The same error perpetuates down through the page, including in Yoast all in one, and in the posts themselves. Now this is particularly interesting, because in the posts themselves the link to the image is “hardcoded”, in that editing the post will show the http://www.domain.com/wp-uploads&#8230;. but when displayed, the HTTP is dropped (images start with just // ).

    It would appear that the scheme is not being set, and as a result returns the default null.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter Another Guy

    (@another-guy)

    Two additional notes:

    1 – this applies to both thirdlevel.rootdomain.com sites (ie, regular third level on the base domain of the MU site) and other domains http://www.domain.com which are on the MU sites, and

    2 – other stand alone wordpress sites on the same server (dedicated, full control, no other users) do no have this issue, and

    3 – the issue is the same no matter what theme is used, and appears related only when the wordpress install is set to be MU, and

    4 – the problem occurs on an MU install with only the default site (ie, no user sites, just the MU default signup page site).

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    the site_url isn’t coming up exactly correctly.

    Where?

    <link rel="profile" href="//gmpg.org/xfn/11" />
    <link rel="pingback" href="//www.domain.com/xmlrpc.php" />'

    You listed that but … I don’t know what’s wrong about it? What SHOULD it be?

    Nothing’s wrong with the dropped http, though it’s weird and probably done by another plugin.

    Thread Starter Another Guy

    (@another-guy)

    Mika, look closely: there are no HTTP in front of those links.

    For a forgiving bot or code checker, those things work. For more strict checkers, the links are all broken (no protocol given) or will end up combined with your base href to create a 404 (as it will point to your site, not the true destination).

    Only happens on MU sites, does not happen on stand alone sites.

    There is nothing wrong with those urls. They are referred to as ‘protocol relative url’. Google it. It is good form if your site uses ssl.

    Thread Starter Another Guy

    (@another-guy)

    They may be “correct” but it is not consistent. on MU, they are like this. On non-MU sites, they are the other way. What happens is that bots that look for “http” as a trigger to spot a link are NOT seeing it. Instead, it generates errors. Some see it and attach the document root instead, creating 404s.

    It would appear even Googlebot fails on some of these, at least what I am seeing in the apache errorlog.

    Why would it be one way on MU sites, and the same links displayed diffently on non-MU sites?

    Oh, those sites don’t use SSL – it’s a royal pain to setup for MU sites that use multiple domains.

    IMO, that is not correct. We have/had MU sites that used PRURL and some that did not. It was due to plugins and themes. We specifically make ours PRURL because we allow http and https.

    Thread Starter Another Guy

    (@another-guy)

    I have done testing by stripping a site down to the basic 2014 theme and disabling all plug ins (a pain in the butt, as it affects every other site on the install) and I still see the same results. I don’t have a single stand alone site with the issue (and I manage many), but all of the MU installs have the issue – even with the same themes and plugin mix

    PRURLs seem like a great idea in theory. In reality, there are any number of bots that don’t work with it, and some of them are intensely agro about it. It’s especially annoying if your theme or posts contain a number of images,as each one is converted, creating a bunch of false relative paths for bots (including Googlebot and now Bing) who trip over this problem and flail around generating piles of 404s and server load (because most 404 pages trigger another wordpress page load, which loads the system up).

    Can you point me to anything here on the wordpress site about it?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    You know, I checked on my sites and they’ve all got http:// in them, on Multisite and non-Multisite, except the sites running CloudFlare and Google PageSpeed.

    What’s on your server?

    Thread Starter Another Guy

    (@another-guy)

    WHole list on the serve? Pagespeed, memcache, mod expires, and about 200 other things. Hard to tell. I have sites on cloudflare and site off cloudflare, sites on and off mod pagespeed. I cannot spot a relationship between those and the sites that do and do not have the appropriate siteurl, except that MU sites have issues and regular sites don’t – on the same server.

    Not sure what is causing it, the only commonality I see is MU. I will have to take a domain out of an MU install and move it just to see.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Pagespeed

    Ding.

    What are your pagespeed settings? I know you can override them in .thaccess. Did you do that for multisite?

    Thread Starter Another Guy

    (@another-guy)

    Actually, pagespeed is pretty much required otherwise wordpress is too slow for google and sites get pushed down results.

    Again, why would it do that for MU sites but not stand alone sites on the same server running the same config for all?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    That isn’t at all answering what I asked.

    Did you do any custom overrides in the .htaccess for where multisite is installed? Yes or no πŸ™‚

    Thread Starter Another Guy

    (@another-guy)

    Ipstenu, no, the htaccess is as simple as it’s allowed to be. Has to be when you are using multiple domains, you can’t do anything “magic” without affecting every other site as well.

    So the answer is a resounding no. htaccess is plain.

    Thread Starter Another Guy

    (@another-guy)

    Let me add: what would be the point of overriding pagespeed? I can’t think of a reason why I would want to give back significant performance improvements.

    I was struggling with this one for months, until your post pointed me in the direction of a new lead – it has to do with the Cloudflare plugin!

    https://support.cloudflare.com/hc/en-us/articles/203652674

    In the configuration for your Cloudflare WP plugin, set “HTTPS Protocol Rewriting” to “Off”.

    I hope this saves someone some pain.

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘MU multi domain site_url missing http’ is closed to new replies.