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

  • 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:
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: Document Root: /public_html/ Redirection: none

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

If I try and go to it resolves to the subdomain If I add a redirect to the subdomain to point to 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/ folder.

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) ''. You must first remove the addon domain(s)."

Please help. Thanks, Ryan
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 ''. They simply need to be changed to '' 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