Multi domain WPML - Domain alias

I have one main domain with a Wordpress and the WPML plugin and I suppose that it has been correctly set up because I see no errors so far.

Hestia 1.5.4: Nginx + Apache + FPM

I configure domain.co.uk as an alias of domain.eu but when I activate the multi domain feature and try to assign:

domain.eu → Spanish
domain.co.uk → English

I can only see domain.eu

After I have read all the troubleshooting information from WPML and as stated here ( domain per language don't work nginx - WPML ) they asked to make a small test:

add exit( $_SERVER[‘HTTP_HOST’] )

at the beginning of the index.php file and enter as the domain.co.uk

I get domain.eu when I enter as domain.co.uk so there has been a redirection.

How can I configure hestia to make it work?

I tried a workaround with no luck either:

  • remove domain.co.uk as an alias
  • create domain.co.uk as a domain
  • login SSH
  • ln -s /home/user/web/domain.eu/public_html/ /home/user/web/domain.co.uk/public_html

Same result as before:
When I visit domain.co.uk I see domain.eu

No you should not configure second domain as separate site, instead use it as alias for primary domain like you did in Step 1. If domain2 redirects to domain1, it means your DNS/vHost configuration is good… your internal Wordpress internal routing is NOT working.

You have not mentioned what you did inside it so better paste a screenshot to see if it is correctly setup.
WPML should have option to setup multi-domain. Ref :https://cdn.wpml.org/wp-content/uploads/2021/04/typing-in-german-domain-name-wpml-1.png

2 Likes

Hello. Thank you very much for answering. I did it exactly as the WPML manual says.

I have just checked again.

You are right. I still can’t get the homepage to redirect correctly but the rest of the URL’s do redirect correctly so it is not Hestia related.

Still with method 2 though but of course method 1 will work and it is the way to go.

Thank you for your time. I finally looked at the problem in a different way.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.