I want to have translated versions of my website to serve certain countries. I want to use different, dedicated domain names, like:
I want all the new domains to point to the root folder of the main domain's hosting, so that it loads the exact same index.php file. In that file, I check on which domain name the user is, and depending on that, I fetch the correct language from the database. This makes it easy to maintain: I use the exact same .php files for every domain name but just load in a different language. I will use a
hreflang tag on all pages.
My question is: how do I set up the new domain names? Can I just set them up as addon domains? Because I want all my domain names to be indexed by Google of course. Or does Google ignore addons or something?
In short: is the setup described above a proper way to do it? An alternative way would be that I just buy hosting for the new domains as well, and I copy everything, including the databases... would this be better from a SEO perspective, or is what I had planned equally good?