Another site on my domain

Started by Abhinavjain, Jul 11, 2022, 05:08 AM

Previous topic - Next topic

AbhinavjainTopic starter

There is a website mysite.com
Recently I discovered in the Google.Webmaster panel that the wrong pages are involved in the search. The address that starts with the domain name.

Those. It turns out the picture is that it's as if some site is hosted on my domain/somedirectory/.
Accordingly, there is no /somedirectory/ directory on my site.

DNS problem, hosting problem, what the hell?
  •  

Sevad

Yes, it's 100% hаck, ask your hosting provider to check your site for malicious code and viruses.
For your part, you can follow the instructions for eliminating the hаck provided on this site.
  •  

ezhabchik

The first possible reason for this error is that the domain name record directs to one IP address, and another IP is specified in the Apache configuration file. Go to apache.conf (for instance, /etc/apache2/apache2.conf) and make sure that in the VirtualHost section the domain IP address matches what is specified in the A record.

Restart the apache web server using the commands

systemctl restart apache2 - Debian OS/Ubuntu
systemctl restart httpd - Centos OS

If you are using the ISPmanager panel, check the IP address of the website in its settings in the Sites section - Site Settings button — IP address field. The value of the field must match the address to which the domain is delegated.

The second possible reason is that the domain name was not created on the web server. Go to the ISPmanager control panel and create a domain with the correct IP address.

Nginx Web Server
For Nginx, this error may also occur due to the mismatch of IP addresses in the configuration file and in the DNS record for the domain. In nginx.conf (for example, /etc/nginx/nginx.conf), check this the desired IP is registered in the server section in the listen line. For instance,
server {

              server_name domain.com www.domain.com;

              listen 8.8.8.8;

              ...............

}
Restart the Nginx web server using the command

service nginx restart
If the ISPmanager panel is installed on the server as described for the apache web server, check the value of the IP address field.

If you use both Apache+Nginx web servers, then check the configuration files of both servers for the inconsistencies described above.
  •