SOLVED Why is my subdomain redirecting to my www?


Sep 16, 2020
cPanel Access Level
Root Administrator
Hi there,
I am trying to create a staging Wordpress server that is a copy of an existing site I have running on the root and www domain. I created a new sub-domain and I can see in my domain registrar that I have a staging A record that is indeed pointing at my server.

The problem is when I actually go to the site. I get a 301 redirect when I go to that redirects to When I go to cpanel though I have no redirects on the redirects page and on the subdomains page, it says that my does not have any redirects.

How I copied the site was download a zip of my current website and do a find and replace for all and replace it with These changes were all almost exclusively in the .htaccess file. Here's an example of what the .htaccess looks like:

# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

RedirectPermanent /about/press/
# there are hundreds of more redirects like this for every page on the site, all of them were updated to staging.

Any things to double check? I can't tell if this is a configuration with some kind of access file in the site folder or if there is a configuration parameter with cpanel.

Thank you!
Last edited by a moderator:


Well-Known Member
Jun 9, 2020
cPanel Access Level
Root Administrator
Also re-write the URL in the WP database. If you go to general settings you will see that WP also stores the domain inside it's db. If you copy the site that needs to be changed as well.


Feb 3, 2021
cPanel Access Level
Website Owner
I came across this post from searching the forum and I have similar problem with a slight twist.

subdomain is created.
database created and user is set to the database for the subdomain
Using file manager i have extracted the zip file and copied the files into subdomain folder which is in root. Not public_html
a copy of main domain database was exported and than imported into subdomain database
wp-config file set to connect to sub-domain.

When i visit the url for sub-domain. It will redirect me to
i have checked to see if there is anything in redirect section inside cpanel and there is nothing.

What am i not performing correctly?

Thank you in advance