I duplicated my website but the copy redirects back to the source site Print

  • 0

Problem Description

  • Your website has been duplicated by manually copying the files between domains (and/or subdomains)
  • You used the Plesk "Website Copying" function top copy your files between domains (and/or subdomains)
  • After copying the site all or parts of the destination domain (ex: staging.domain.com) redirect back to the source domain (ex: domain.com) and/or load content from the source domain
  • You may or may not have altered the site files to tell it that it now belongs at the new domain or subdomain

To simplify the resolution description, we'll pretend the copy was done to create a staging site by using staging.domain.com to refer to the destination of the copy, and domain.com to refer to the source of the copy.

Problem Resolution

Websites powered by web apps (examples: WordPress, Joomla, or Drupal) use databases to store the content and settings for the site, like page and post text. When you copied the files from domain.com to staging.domain.com, the staging site will still be loading all the content and settings from the database for domain.com, meaning they both now share the same database.

In this state, content or setting changes made on staging.domain.com would reflect on the domain.com as well. With WordPress (and probably other apps too) you'll find that attempts to load staging.domain.com redirect you back to domain.com.

If you then made changes to try to change the site to respond at staging.domain.com, you likely then also changed the live site to staging.domain.com.

Here's how to fix this:

  1. If you made changes to force the site to respond at staging.domain.com, revert those changes now
  2. Remove the files at staging.domain.com
  3. Use our 1-click web applications clone function to copy the site from domain.com to staging.domain.com. The 1-click web apps utility will automatically copy not just the files but also the database and edit the copied database to change all references of the source domain with the destination domain

If you don't wish to use 1-click web apps to fix this, you will need to take care of parts 2 and 3 manually. You can learn how to do this in our website migration guide, under Step 1, Option B: I will be transferring manually.

 


Was this answer helpful?

← Back