• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

WP Toolkit adds redirect with www. in front of subdomain on cloned instance

AKTM

New Pleskian
Hi,
I meant to set up a staging instance for a site.
The domain is set up as example.com in plesk. However, when viewing the WordPress instance in the WP toolkit its title is www.example.com.

Now if I go to clone that instance to staging.example.com I do get a new subdomain within the websites-panel as staging.example.com. However, upon visiting staging.example.com the server redirects to www.staging.example.com which is not set up in the DNS, nor should it have to be.

I have removed the www. part from the site url within the WordPress database and within the WP-toolkit's sqlite database but can't seem to get rid of the redirect.

I would also be interested in why this happens in the first place.

Thanks!
 
Besides the URL stored in the Wordpress database in "home" and "siteurl" of the wp_options table, it can also be a redirect in the "hosting settings" of the domain where some users define, that the URL shall always be redirected to the www spelling type.
 
I had already tried that and it didn't work yesterday. I had also made sure to disable browser caching as to not follow stale redirects.
However, I tried it again today and it is now working properly without any additional changes. The redirect might have been cached at some other point in the network or maybe the server config was updated with a certain delay.
Either way, It's working now so I'll mark this as resolved.
Thanks!
 
We are actually constantly battling the handling of www on wordpress sites. The majority of the clients we deal with have their URL set as www.domain.com. If we attempt to duplicate these to staging we end up with www.staging.domain.com, when the desired behavior in this case would be staging.domain.com. Now I understand that this is to make it easier to re-launch that staging site programmatically, but I wish there was a way I could specify the URLs when duplicating to staging and launching a staging site... like an override or something. In some hosting environments we can use wp-cli to manually fix these things, but in others we are not given that access. In restrictive environments we could try to simply replace everything in the database but this doesn't catch things at the account level. Just another annoying thing that we have lost hours trying to navigate through.
 
We are actually constantly battling the handling of www on wordpress sites. The majority of the clients we deal with have their URL set as www.domain.com. If we attempt to duplicate these to staging we end up with www.staging.domain.com, when the desired behavior in this case would be staging.domain.com. Now I understand that this is to make it easier to re-launch that staging site programmatically, but I wish there was a way I could specify the URLs when duplicating to staging and launching a staging site... like an override or something. In some hosting environments we can use wp-cli to manually fix these things, but in others we are not given that access. In restrictive environments we could try to simply replace everything in the database but this doesn't catch things at the account level. Just another annoying thing that we have lost hours trying to navigate through.
Have you seen my above post that explains how Wordpress works with URLs?
 
Have you seen my above post that explains how Wordpress works with URLs?
I see a post From Feb 7 2019 that mentions the DB entries being the cause, which I am aware of and still believe that this is undesired behavior. The desired behavior would be to have the staging creation process ask what to do with the www in the DB..... so you don't end up with www.staging.domain.com.
 
Back
Top