cancel
Showing results for 
Search instead for 
Did you mean: 

How to implement domain alias in Magento2

How to implement domain alias in Magento2

Hello, I have a magento2 website and I am implementing a domain alias/server alias (not redirect) for this website similar to cPanel implementation here: https://blog.cpanel.com/pointing-two-urls-to-the-same-website/ My primary domain is `sub.mydomain.com` and I want to add `myanotherdomain.com` as its alias so the website content is the same for both urls. I have tried to add ServerAlias in VirtualHost similar to this: https://magento.stackexchange.com/questions/245721/virtual-host-setup-in-local-host-magento-2 but it didnt work and I have no idea what's wrong. Is there any best practice to implement this? FYI: this website is running in a docker which is hosted in Azure VM. Thanks.

1 REPLY 1

Re: How to implement domain alias in Magento2

Have you found the solution for the above ?
if yes please provide me the info.