Sometimes, after migrating a bunch of domains from a server to another with cPanel’s “Migrating tool”, you see that a lot of subdomains which worked like a charm on the first server don’t work on the fresh one.
In some cases the subdomains appear in cPanel’s “subdomains list” but don’t work, they are redirected to the old IP, they show a 404/505, they don’t resolve to any IP (even if present in the DNS Zone), they point to another directory on the server, etc etc.
This also occurs after removing an addon domain without removing its subdomains, than adding the domain back as a standalone domain (hapens all the time, reported this bug to cPanel for 1000 times).
This is because of the buggy “Migrating tool” and the soup that cPanel creates after each migration/removal of any domain (and/or its subdomains). Usually these problems are solved with a ticket to cPanel, where the cMonkeys reply in 2 minutes but really solve the problem in 2 days.
Usually the best thing to do is to remove all subdomains and parked domains, than add them back. This can also be adapted for addon domains, with some extra-care. So, in order to make your life easier, here’s a list of files/places that you need to search:
Please note that you need to remove any “.cache” file in /var/cpanel/userdata/some_buggy_user/
After altering these files it’s mandatory to run:
8 ) /scripts/fixvaliases
Usually altering those files and executing the rebuild/fix scripts will save the day. If you find any other “weird places” to search…please let me know.
cPanel – we all love you!