Alias Domain Opens Main Domain
I apologize if this has been answered elsewhere but I've searched everywhere for a solution. I have 2 domain names for a website. domain1.com and domain2.com domain1.com was the first one created on the server. I added domain2.com as an alias. When I visit domain2.com in a web browser, it changes to domain1.com in the address bar. Is there any way to fix this? If a visitor goes to domain1.com I want it to remain that address in the address bar, if a visitor goes to domain2.com I want it to remain domain2.com in the address bar. I dont want it to redirect, I want it to work as an alias.
-
Hello, This is because of a redirect, either via .htaccess or a PHP redirect. If you are using WordPress for example, it will use a PHP redirect to ensure the domain you have set in the settings is the domain that is redirected to. 0 -
Yes, it is a WordPress site. So I'm guessing the only solution is to create it as a separate site with a separate WP database? 0 -
That is correct, WordPress will only allow one domain per install. 0 -
Hello, This is an issue with how WordPress configures the site URL. You may find this WordPress URL helpful: Topic: Multiple URLs with same code base. " WordPress.org Forums Thank you. 0
Please sign in to leave a comment.
Comments
4 comments