1

I want to have translated versions of my website to serve certain countries. I want to use different, dedicated domain names, like:

  • www.mywebsite.example (main domain)
  • www.monsiteweb.fr (new)
  • www.misitioweb.es (new)

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?

  • How would Google know that a domain is an add-on or a main domain? – Stephen Ostermiller Mar 4 at 11:14
1

If your hosting provider allows mapping more than one domain in your account then the only thing you need to do is:

  1. Create a virtual host per domain.
  2. Point each of them into the same web root directory.

You need to clarify what you mean by "add-on domains". I suspect this is your hosting provider's nomenclature, so it would be useful to know what hosting provider it is.

However, if what you mean is "Do I need to have a separate hosting plan for each of my domains?" then the answer depends on your current hosting plan and it's capability to map multiple domains. You might be better off asking this question to their support staff.

  • Addon domains are a feature of cPanel: documentation.cpanel.net/display/78Docs/Addon+Domains cPanel is very popular software installed by many web hosts that allow their customers to configure their sites. – Stephen Ostermiller Mar 4 at 23:05
  • 1
    @StephenOstermiller If that's the case then your link contains all the answers: 1. Your hosting provider must specify a maximum number of addon domains that you can create (greater than 0) in the Modify an Account interface (WHM >> Home >> Account Functions >> Modify an Account). A value of 0 prevents addon domain creation. 2. To choose a document root other than the automatically populated value, manually enter the directory name in the Document Root text box. – Kuba Serafinowski Mar 4 at 23:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.