By prxbl
I am using vestacp on my droplet running Ubuntu. I have two domain names that I’ve configured in Vestacp. Each domain is configured with the following nameservers at the registrar: for domain1.com > ns1.domain1.com, ns2.domain1.com for domain2.com > ns1.domain2.com, ns2.domain2.com
I have created two DNS entries in VestaCP, both pointing to the single ip address asigned to the droplet. Both entries have template : child-ns.
domain1.com also has SSL certicate configured. domain2.com does not have SSL.
Everything works perfect when accessing https://www.domain1.com Everything works perfect when accessing http://www.domain2.com
Let’s say I have a page on domain1.com called mypage. https://www.domain1.com/mypage The problem is, I can access that page through domain2 by adding https like so: https://www.domain2.com/mypage (even though this page does not exist on domain2)
Google somehow noticed this and it’s now indexing pages from domain1.com, under domain2.com which I don’t want. What am I doing wrong? How can I stop this behaviour?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Hey friend!
The best way is to enable SSL on both domain1 and domain2. Since VestaCP has LetsEncrypt built in, this should just be a check box away. If you have no SSL on domain2 then that means there is no matching virtual host for domain2 over port 443, causing requests to port 443 to default to the first available virtual host (which in this case is domain1).
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.