Let's say my main domain is www.domain1.com and my 2nd domain is www.domain2.com. I added a 2nd domain via addon domains and when I go to my 2nd domain url it just redirects me to domain1.com. What is the problem?
It is possible that domain2 is in the same directory as domain1. When you create the additional domain, Cpanel will make a new folder for the addon domain. Make sure the folder is not a subdomain (www.domain1/domain2.com) and update the nameservers for the 2nd domain. Check to see that a htaccess file is not redirecting the addon domain, Place the new domain in the public directory,folder name (domain2).
Hello, Ruriko. An add-on domain means that you will be using the same directory that you have on the server for hosting another domain than your main and original domain. Let us say that "mydomain.com" points (through DNS) to "/home/user/public_html". Now you create an add-on domain, called "otherdomain.com". When prompted for a directory name, you answer "/home/user/public_html/other". All the pages that you mean to be accessed through the new domain must be placed in this directory. Add-on domains are relative to your account's home directory. An add-on domain must be registered the same way that any domain and the registrar must point it to the DNS servers of the hosting provider.
Uh they're both in different directories and both pointed to the same DNS. I still get redirected to my original domain
It sounds like an htaccess is redirecting incorrectly.. most likely in the server root before your even get to the domain folders... might be easiest to speak with your host provider... could also be a dns issue
If you have the concepts right, and you think that all is well done, and things still don't work, then it's time to talk to your hosting provider. Good luck.