Transition from Subdomain to Regular hosting (AddOn Domain) (Again)

Avatar
  • Answered
Asked this last week and got what I thought was a good answer, but it did not work. Reposting with additioinal info and the end:

I have developed a client website on my VPS1000 account on a subdomain: blackcreekprecision.mercagency.com.
I would now like to transition them to regular hosting and they have pointed the domain to InMotion's nameservers.
I'm not how I did this, but I have the following entries in cPanel for both SubDomains and Addon Domains:

Subdomain:
blackcreekprecision.mercagency.com Document Root: /public_html/blackcreekprecision.com Redirection: none

Addon Domain:
blackcreekprecision.com Document Root: /public_html/blackcreekprecision.com (same as above) Redirects: none

If I try and go to blackcreekprecision.com it resolves to the subdomain blackcreekprecision.mercagency.com. If I add a redirect to the subdomain to point to blackcreekprecision.com then I recieve and error loop.

I believe the solution is to simply remove the subdomain entry, but I'm terrified as the confirmation for removing the subdomain states "permanetly remove" and I dont want it to delete any files since both the subdomain and addon point to the same /public_html/blackcreekprecision.com folder.

ADDITIONAL INFO:
JeffMa answered with:
"Of course, make a backup of any files before making any changes, but removing the subdomain will still keep the folders intact. "

That does not work. If I try and remove the subdomain, I get the following error message:
"Sorry, the subdomain blackcreekprecision cannot be removed because it is linked to the addon domain(s) 'blackcreekprecision.com'. You must first remove the addon domain(s)."

Please help. Thanks, Ryan
Avatar
Scott
Hello Ryan,

Jeff is correct that the file structure itself will remain intact, so no worries about losing the files. However, the error message shows because a subdomain entry is automatically added when an addon is created on the account. Therefore, it is impossible to remove the subdomain entry from the list.

The issue you are seeing, however, does not come from the subdomain or addon domain itself, nor in redirecting in general. It is due to the URL settings in the Magento database. There is a table in the database named 'core_config_data' that contains the URL. It is set once for regular URL and once for Secure URL. In your case, both columns are set to 'blackcreekprecision.mercagency.com'. They simply need to be changed to 'blackcreekprecision.com' and then the site will appear normally.

If you view the table data i your phpMyAdmin tool, the two fields that need to be changed appear to be the 13th and 14th rows. Simply click on the column that contains the URL and make the changes. After that, when visiting the site, it will no longer redirect to the subdomain version.

Kindest Regards,
Scott M