This article helps you answer a number of questions:
- My site opens by a domain name which is not mine. Is my website stolen?
- Why does another website open by the name of my site?
- Why does my site don't open via httpS, but opens via http?
The answer to all of the questions above is this is how web-server works.
A web-server is configured to listen on specific IP address and port (IP-address:port). Usually, this is the main IP address of the server and ports 80 and 443 corresponding to HTTP and https protocols. Normally, the web-server serves several websites, so every site is assigned a specific IP address(-es) in the configuration file. Also, it is defined what protocol it will use, in other words, whether it will run on port 80 or 443. Multiple sites on the server may resolve to the same IP address:port.
When we want to open a website, we enter something like this http://google.com in a web browser, and click "Enter". The following operations are performed at that moment: the domain name google.com is resolved to an IP-address. The user’s computer connects to the host with that IP address. For example, we have IP address 220.127.116.11. If you enter http in the browser, this will mean that the connection will be made on port 80.
So, the request for google.com is sent to server 18.104.22.168 on port 80.
The web-server receives connection to 22.214.171.124:80, looks through its websites and finds the sites corresponding to IP address:port. It finds google.com among them and transmits information about that site back to the web browser.
What will happen if it doesn't find the site corresponding to IP address:port? In that case the web-browser will send the browser information about the first website it will find.
Let's consider a few solutions.
My site opens by a domain name which is not mine. Is my website stolen?
Your site is not stolen. This may happen if another domain name is resolved to the same IP address as your site. And your site is the one that the web-server has found for the IP address.
What should I do? If you have root permissions in ISPmanager, navigate to the WWW-domains section and create a domain name, specify the same IP address as for your site, for this WWW-domain, and select the Default website checkbox. Once completed, when a user accesses the websites which is resolved to your IP address, the newly created packed page.
Note:For this domain, you need to enable an SSL certificate: WWW-domains → select a domain → Edit button → enable the Secure coinnetion (SSL) option and select the required SSL certificate.
If you don't have superuser permissions, contact your hosting provider.
Why does another website open by the name of my site?
For example, when we want to access one.com, two.com opens. This may happen when the IP address that resolves in one.com, does not match the IP address specified in the configuration file of the web-server. The web-server cannot find one.com associated with P address:port, and displays the first site it can find, i.e. two.com.
How to solve it? Check what IP address is resolved to that site. You can use the dig or nslookup commands. Specify the same IP address for the website in ISPmanager – WWW-domains.
Why does my site don't open via httpS, but opens via http?
Because the web-server receives a request for IP address:443, looks through its websites on that IP address:port, and cannot find your website.
What should I do? Enable SSL for the website in ISPmanager → WWW-domains.