Support » Plugin: Jetpack - WP Security, Backup, Speed, & Growth » site url and home url continually change

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Animesh Gaurav

    (@bizanimesh)

    Hi there,

    I did some changes in the URL in our system and the issue shouldn’t happen again. Could you also please go to Settings > General in WP-Admin of justincox.com and confirm WordPress Address (URL) and Site Address (URL) is set as https://justincox.com? It should but I just want to confirm. 🙂

    Thread Starter Justin

    (@coxofdonuts)

    Good morning.

    I can confirm the Site Address settings are correct (https://snipboard.io/pOZVmi.jpg). However, the issue persists (https://snipboard.io/lU0PuE.jpg).

    Plugin Contributor Dan (a11n)

    (@drawmyface)

    Hi Justin

    Everything is set correctly on our end.

    I’d suggest speaking to Dreamhost about this. It sounds like something, whether it be your host’s platform, a designation in your wp-config.php or .htaccess files, or a plugin, is setting/resetting your site’s URLs.

    Your host should be able to make sure that only the URL you actually use is being set for your site and home/site URL.

    Thread Starter Justin

    (@coxofdonuts)

    .htaccess was clean, though I found the following in wp-config:

    /**
     * Removing this could cause issues with your experience in the DreamHost panel
     */
    if (preg_match("/^(.*)\.dream\.website$/", $_SERVER['HTTP_HOST'])) {
            $proto = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https" : "http";
            define('WP_SITEURL', $proto . '://' . $_SERVER['HTTP_HOST']);
            define('WP_HOME',    $proto . '://' . $_SERVER['HTTP_HOST']);
    }
    /* That's all, stop editing! Happy blogging. */

    That looks like what is most likely causing the issue. I removed the code and will keep an eye on the Jetpack Activity tab to see if it still bounces back and forth.

    Thread Starter Justin

    (@coxofdonuts)

    Yeah, I think that wp-config code was the issue. It’s been about an hour and a half and the URL switching hasn’t occurred. Before removing the code, it was happening every 10 to 20 minutes. I’m going to call this resolved.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Plugin Review Team Rep

    That code shouldn’t have mattered. It’s on every single DreamPress site and a lot of them use Jetpack. I checked my own site (DP, Jetpack Pro) and it’s not doing that at all.

    The only reason that would have mattered would be if you were actually at one point using dream.website to access the site. That could have been caught perhaps by something as a valid URL and it would keep hitting it, which would tell Jetpack “Hay! My URL changed!”

    But if that’s the case, I’ll loop back at DH and see what we can do to NOT flag that (maybe “If dream.website, put Jetpack in Dev mode” like we do for staging)

    Thread Starter Justin

    (@coxofdonuts)

    I did use the dream.website link to set up the site initially before migrating the domain. When the domain fully transferred, I changed the settings to the correct domain. Whether that code should cause the issue or not, it fixed the problem. I just checked the activity log, and the URL switching hasn’t happened since.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.