Skip to main content

Why is my subdomain redirecting to my www?

Comments

8 comments

  • andrew.n
    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.
    0
  • coherent
    Copying my existing database, updating the address of the database in the wp code, and then updating the site address in the database worked perfectly. Thanks so much!
    0
  • cPanelLauren
    Glad to see you were able to get the issue resolved. Thanks for updating here with what worked.
    0
  • AmirZ
    I came across this post from searching the forum and I have similar problem with a slight twist. subdomain is created. design.domain.ca 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 domain.ca 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
    0
  • AmirZ
    Any help regarding above content would be appreciated.
    0
  • cPRex Jurassic Moderator
    @AmirZ - since this is a WordPress site, have you updated the Siteurl value in the WordPress database to reflect the change?
    0
  • AmirZ
    @AmirZ - since this is a WordPress site, have you updated the Siteurl value in the WordPress database to reflect the change?

    that was the step I did not perform. Cheers
    0
  • cPRex Jurassic Moderator
    @AmirZ - I'm glad that helped!
    0

Please sign in to leave a comment.