EuroDNS | How to add different WordPress websites ...

How to add different WordPress websites for different domains in one web hosting subscription

Last Updated: May 10, 2016 07:07AM CEST

You can add multiple websites assigned to different domains in your web hosting subscription, and use WordPress to set up these websites.

First of all please create different domain pointers for each website/domain in the web hosting subscription:

1. Log in to your EuroDNS account and go to PRODUCTS > WEB HOSTING.
2. Move the cursor to the domain name concerned and click on View.
3. Click on Manage.
4. Go to Configurations and click on Domain Pointers.
5. Click on Add.
6. Enter the domain name and select the option Point to a sub-directory. Enter the name of the folder for this domain, click on OK.

The domain pointer will be created for the apex domain and for the WWW host in this domain, for example domain1.com and www.domain1.com.

Then, install WordPress in each of these domain folders:

1. Log in to your EuroDNS account and go to PRODUCTS > WEB HOSTING.
2. Move the cursor to the domain name concerned and click on View.
3. Click on Manage.
4. Already in the Hosting Control Panel, click on Open Source Applications.
5. Click on Add new next to the application you want to install.
6. The system will guide you through the steps from here.

Repeat the steps above for each domain/website.

The WordPress installation will create a special file: "htdocs/index.php4". Replace the content of the file with the one below, as this file will be used to redirect the HTTP requests to the specific folder depending on the domain/website requested:

<?php

switch ($_SERVER['HTTP_HOST']) {
  case "domain1.com":
  case "www.domain1.com":
    header('location: /domain1');
    break;
  case "domain2.com":
  case "www.domain2.com":
    header('location: /domain2');
    break;
  default:
    // unknown FQDN, nothing to do
    break;
}

?>

IMPORTANT: please note that you need to replace the domains’ and folders’ names in the file above with your own domains and folders.
If you have any difficulties, please contact our Customer Services Team and we will do it for you.


 

HELP & SUPPORT