Create alias domain

Discussion in 'Installation/Configuration' started by Dennis_sp, Dec 11, 2018.

  1. Dennis_sp

    Dennis_sp Member

    We currently have two websites, one for Dutch clients:
    http://www.goedemorgen-goedemiddag.nl

    and one for English clients:
    http://www.goodmorning-goodafternoon.com

    The last one was very out-dated and so we made our main site multi lingual. Now what i need is to set the second website up as an alias domain so when visitors browse to it they still see goodmorning-goodafternoon.com in their address bar but the website of goedemorgen-goedemiddag.nl (translated).

    I read the manual about how to setup an aliasdomain for website (chapter 4.6.1.4) but discovered that it only redirects and changes the URL to the first website when i browse to the second one.

    So i figured i had to set this up as an Aliasdomain Vhost (chapter 4.6.1.5) and enabled this feature in the Main config and then tried to create one and used /web for the web folder setting but the first time i just put 'web' and i got the screen 'No results' (so it wasn't saved or errored out i guess) and the second time i tried to create it by using /web as the web folder i got this error:

    There is already a website or sub / aliasdomain with this domain name.

    So what do i do now?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The alias domain that you added is correct for that purpose, you don't need a vhost alias here. A vhost alias domain would be used if both websites run their own (different) cms, which is not the case when you have a multilingual website witha cms that supports multi site hosting. If you get a redirect to the main domain, then you either have added such a redirect for the main website (check redirect tab of the main website) or your cms is not configured correctly yet and does this redirect on it's own.
     
  3. Dennis_sp

    Dennis_sp Member

    I don't have anything in the redirect tab but i do have another alias domain that points to the same domain:
    https://imgur.com/a/AbWznS2
    [​IMG]

    Is that conflicting? I can't create a regular aliasdomain anymore now too even though before i created it without problems.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, you can have as many alias domains in a website as you want. And a domain may exist only once in apache, so when you added the same domain as website, then you have to remove the website first or change its domain name before you can re-add it as aliasdomain.
     
  5. Dennis_sp

    Dennis_sp Member

    I checked but goodmorning-goodafternoon.com doesn't exist anymore as website (never has) or as aliasdomain. Could it be that the deletion process failed on database level?
     
  6. Dennis_sp

    Dennis_sp Member

    I was able to resolve my problem for creating the new aliasdomain thanks to this thread:
    https://www.howtoforge.com/community/threads/unable-to-edit-a-website.75046/

    I used phpmyadmin to check the ispconfig database and discovered the domain still existed in the database so that's why i could not create it again. The vhost also existed in /var/www/clients/clientx/

    However i still have the the same problem as when i started. I have created the alias again and when i go to https://goodmorning-goodafternoon.com it still changes my URL to https://goedemorgen-goedemiddag.nl

    This is what my alias config looks like: https://imgur.com/a/RygNt1q
    Do i have to change the redirect type field?

    You said:

    If you get a redirect to the main domain, then you either have added such a redirect for the main website (check redirect tab of the main website) or your cms is not configured correctly yet and does this redirect on it's own.​

    There is no redirect setting in the main website.
    The CMS is Wordpress, do i have to change anything there?
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    wordpress has Site Url, (if I remember correctly the name of the setting) which must be the URL you want to use to access the site. If it is wrong, wordpress changes the URL to that.
     
  8. Dennis_sp

    Dennis_sp Member

    Where do i configure this? In Wordpress, .htaccess or ISPConfig?
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    In WordPress, see WordPress settings.
     
  10. Dennis_sp

    Dennis_sp Member

    Aha, so the conclusion is you can't use an alias where the URL doesn't change in Wordpress? Because that field is a fixed setting.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    No, it's all a matter if you configured WordPress correctly. WordPress is capable of running multi site setups, but you have to configure that in WordPress and using an Alias domain in ISPConfig is the right approach for that.

    See WordPress Multisite functions:

    https://codex.wordpress.org/Create_A_Network
     
  12. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    is it a wordpress multisite? or is it wordpress with a language plugin like wpml?
    if it's something like wpml then by default it'll only display the default language on both domain names, and use an extension of the url, like lang=DK? to display the page in that language.
    there should be settings in that plugin to use the different url's to display the different languages so eg English.com will display the page in English, eg dutch.com will display the same page in dutch.

    as far as ispconfig is concerned, you just create a normal website alias, with redirect type 'no flag'
     

Share This Page